From 638803d4568121d73a266e440530f880ffa2dacc Mon Sep 17 00:00:00 2001 From: Bob Peterson Date: Thu, 6 Jun 2019 07:33:38 -0500 Subject: Revert "gfs2: Replace gl_revokes with a GLF flag" Commit 73118ca8baf7 introduced a glock reference counting bug in gfs2_trans_remove_revoke. Given that, replacing gl_revokes with a GLF flag is no longer useful, so revert that commit. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher --- fs/gfs2/log.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'fs/gfs2/log.c') diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index a2e1df488df0..86703c95353e 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c @@ -606,10 +606,8 @@ void gfs2_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd) gfs2_remove_from_ail(bd); /* drops ref on bh */ bd->bd_bh = NULL; sdp->sd_log_num_revoke++; - if (!test_bit(GLF_REVOKES, &gl->gl_flags)) { - set_bit(GLF_REVOKES, &gl->gl_flags); + if (atomic_inc_return(&gl->gl_revokes) == 1) gfs2_glock_hold(gl); - } set_bit(GLF_LFLUSH, &gl->gl_flags); list_add(&bd->bd_list, &sdp->sd_log_revokes); } -- cgit v1.2.3