Skip to content

Commit 7d2da6e

Browse files
author
Andreas Gruenbacher
committed
gfs2: drain ail under sd_log_flush_lock
When a withdraw is carried out, call gfs2_ail_drain() under the sdp->sd_log_flush_lock. This isn't strictly necessary but should be easier to read, and more robust against possible future bugs. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 parent 6e1a833 commit 7d2da6e

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

fs/gfs2/util.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,8 @@ static void do_withdraw(struct gfs2_sbd *sdp)
123123
return;
124124
}
125125
clear_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags);
126-
up_write(&sdp->sd_log_flush_lock);
127-
128126
gfs2_ail_drain(sdp); /* frees all transactions */
127+
up_write(&sdp->sd_log_flush_lock);
129128

130129
wake_up(&sdp->sd_logd_waitq);
131130
wake_up(&sdp->sd_quota_wait);

0 commit comments

Comments
 (0)