diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2018-10-04 15:36:02 +0100 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2018-10-12 07:33:07 -0500 |
commit | 0ddeded4ae768882e5c3a5558f77f27e4e445a6a (patch) | |
tree | d32a5bf5e432cf1949cc71cdaf587345fe165f46 /fs/gfs2/dir.c | |
parent | c3abc29e54a14953ddb26feeb62dd02d57925e52 (diff) | |
download | linux-next-0ddeded4ae768882e5c3a5558f77f27e4e445a6a.tar.gz |
gfs2: Pass resource group to rgblk_free
Function rgblk_free can only deal with one resource group at a time, so
pass that resource group is as a parameter. Several of the callers
already have the resource group at hand, so we only need additional
lookup code in a few places.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Reviewed-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/dir.c')
-rw-r--r-- | fs/gfs2/dir.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 87a6dee88a62..daa14ab4e31b 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c @@ -2042,6 +2042,8 @@ static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len, bh = leaf_bh; for (blk = leaf_no; blk; blk = nblk) { + struct gfs2_rgrpd *rgd; + if (blk != leaf_no) { error = get_leaf(dip, blk, &bh); if (error) @@ -2052,7 +2054,8 @@ static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len, if (blk != leaf_no) brelse(bh); - gfs2_free_meta(dip, blk, 1); + rgd = gfs2_blk2rgrpd(sdp, blk, true); + gfs2_free_meta(dip, rgd, blk, 1); gfs2_add_inode_blocks(&dip->i_inode, -1); } |