diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2020-12-13 11:37:17 +0100 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2021-02-03 18:37:24 +0100 |
commit | 5ae8fff8d031b5728f4c0e36e971bba42bb78bea (patch) | |
tree | b3f7a9d748db4d991d4534cc0b5e9505f0e934e9 /fs/gfs2/trans.c | |
parent | 4a3d049db42b42a36ae84eb8b59d2f5119737253 (diff) |
gfs2: Clean up gfs2_log_reserve
Wake up log waiters in gfs2_log_release when log space has actually become
available. This is a much better place for the wakeup than gfs2_logd.
Check if enough log space is immeditely available before anything else. If
there isn't, use io_wait_event to wait instead of open-coding it.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/trans.c')
-rw-r--r-- | fs/gfs2/trans.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index 2269aa7ad69d..cac93b2004cf 100644 --- a/fs/gfs2/trans.c +++ b/fs/gfs2/trans.c @@ -73,10 +73,9 @@ int __gfs2_trans_begin(struct gfs2_trans *tr, struct gfs2_sbd *sdp, down_read(&sdp->sd_log_flush_lock); if (unlikely(!test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags))) { - gfs2_log_release(sdp, tr->tr_reserved); up_read(&sdp->sd_log_flush_lock); + gfs2_log_release(sdp, tr->tr_reserved); sb_end_intwrite(sdp->sd_vfs); - wake_up(&sdp->sd_log_waitq); return -EROFS; } |