Skip to content

Commit 17a5934

Browse files
AstralBobAndreas Gruenbacher
authored andcommitted
gfs2: Update rl_unlinked before releasing rgrp lock
Function gfs2_free_di was changing the rgrp lvb count of unlinked dinodes after the lock was released. This patch moves it inside the lock. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 parent dac0fc3 commit 17a5934

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/gfs2/rgrp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2584,8 +2584,8 @@ void gfs2_free_di(struct gfs2_rgrpd *rgd, struct gfs2_inode *ip)
25842584

25852585
gfs2_trans_add_meta(rgd->rd_gl, rgd->rd_bits[0].bi_bh);
25862586
gfs2_rgrp_out(rgd, rgd->rd_bits[0].bi_bh->b_data);
2587-
rgrp_unlock_local(rgd);
25882587
be32_add_cpu(&rgd->rd_rgl->rl_unlinked, -1);
2588+
rgrp_unlock_local(rgd);
25892589

25902590
gfs2_statfs_change(sdp, 0, +1, -1);
25912591
trace_gfs2_block_alloc(ip, rgd, ip->i_no_addr, 1, GFS2_BLKST_FREE);

0 commit comments

Comments
 (0)