Commit 7d2da6ed authored by Andreas Gruenbacher's avatar Andreas Gruenbacher
Browse files

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: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent 6e1a833d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -123,9 +123,8 @@ static void do_withdraw(struct gfs2_sbd *sdp)
		return;
	}
	clear_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags);
	up_write(&sdp->sd_log_flush_lock);

	gfs2_ail_drain(sdp); /* frees all transactions */
	up_write(&sdp->sd_log_flush_lock);

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