This patch adds a check to function gfs2_log_flush: if the journal is no longer live, the flush is ignored.
Signed-off-by: Bob Peterson <rpete...@redhat.com> --- fs/gfs2/log.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 896165811063..cd2f54db7f8a 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c @@ -782,6 +782,9 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl, u32 flags) struct gfs2_trans *tr; enum gfs2_freeze_state state = atomic_read(&sdp->sd_freeze_state); + if (!test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags)) + return; + down_write(&sdp->sd_log_flush_lock); /* Log might have been flushed while we waited for the flush lock */ -- 2.20.1