gfs2: fix s_writers.counter imbalance in gfs2_ail_empty_gl
PATCH 1/1 gfs2: fix s_writers.counter imbalance in gfs2_ail_empty_gl
gfs2_ail_empty_gl() contains an "inline version" of gfs2_trans_begin(), so it needs an explicit sb_start_intwrite() as well, to balance the sb_end_intwrite() which will be called by gfs2_trans_end().
With this, xfstest 068 passes on lock_nolock local gfs2. Without it, we reach a writer count of -1 and get stuck.
---
fs/gfs2/glops.c +1 -0
@@ -94,6 +94,7 @@ static void gfs2_ail_empty_gl(struct gfs2_glock *gl)/* A shortened, inline version of gfs2_trans_begin() */ tr.tr_reserved =1 +gfs2_struct2blk (sdp, tr.tr_revokes,sizeof (u64)); tr.tr_ip = (unsigned long )__builtin_return_address (0 ); +sb_start_intwrite (sdp->sd_vfs);gfs2_log_reserve (sdp, tr.tr_reserved);BUG_ON (current->journal_info); current->journal_info = &tr;
PATCH 1/1 gfs2: fix s_writers.counter imbalance in gfs2_ail_empty_gl
Hi,
looks good. Thanks, I'll add it to the -nmw tree in due course,
Steve.
Quoted 23 lines · Eric Sandeen
gfs2_ail_empty_gl()contains an "inline version" ofgfs2_trans_begin(), so it needs an explicitsb_start_intwrite()as well, to balance thesb_end_intwrite()which will be called bygfs2_trans_end().With this, xfstest 068 passes on
lock_nolocklocal gfs2. Without it, we reach a writer count of -1 and get stuck.Signed-off-by Eric Sandeen <[email protected]>---
fs/gfs2/glops.c +1
-0@@ -94,6 +94,7 @@ static void gfs2_ail_empty_gl(struct gfs2_glock *gl)/* A shortened, inline version of gfs2_trans_begin() */ tr.tr_reserved =1 +gfs2_struct2blk (sdp, tr.tr_revokes,sizeof (u64)); tr.tr_ip = (unsigned long )__builtin_return_address (0 ); +sb_start_intwrite (sdp->sd_vfs);gfs2_log_reserve (sdp, tr.tr_reserved);BUG_ON (current->journal_info); current->journal_info = &tr;