aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/dir.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2018-10-04 10:36:02 -0400
committerBob Peterson <rpeterso@redhat.com>2018-10-12 08:33:07 -0400
commit0ddeded4ae768882e5c3a5558f77f27e4e445a6a (patch)
treed32a5bf5e432cf1949cc71cdaf587345fe165f46 /fs/gfs2/dir.c
parentc3abc29e54a14953ddb26feeb62dd02d57925e52 (diff)
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.c5
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,
2042 bh = leaf_bh; 2042 bh = leaf_bh;
2043 2043
2044 for (blk = leaf_no; blk; blk = nblk) { 2044 for (blk = leaf_no; blk; blk = nblk) {
2045 struct gfs2_rgrpd *rgd;
2046
2045 if (blk != leaf_no) { 2047 if (blk != leaf_no) {
2046 error = get_leaf(dip, blk, &bh); 2048 error = get_leaf(dip, blk, &bh);
2047 if (error) 2049 if (error)
@@ -2052,7 +2054,8 @@ static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len,
2052 if (blk != leaf_no) 2054 if (blk != leaf_no)
2053 brelse(bh); 2055 brelse(bh);
2054 2056
2055 gfs2_free_meta(dip, blk, 1); 2057 rgd = gfs2_blk2rgrpd(sdp, blk, true);
2058 gfs2_free_meta(dip, rgd, blk, 1);
2056 gfs2_add_inode_blocks(&dip->i_inode, -1); 2059 gfs2_add_inode_blocks(&dip->i_inode, -1);
2057 } 2060 }
2058 2061