]> Git Repo - linux.git/commitdiff
jbd2: make sure ESHUTDOWN to be recorded in the journal superblock
authorzhangyi (F) <[email protected]>
Wed, 4 Dec 2019 12:46:13 +0000 (20:46 +0800)
committerTheodore Ts'o <[email protected]>
Sat, 25 Jan 2020 08:00:20 +0000 (03:00 -0500)
Commit fb7c02445c49 ("ext4: pass -ESHUTDOWN code to jbd2 layer") want
to allow jbd2 layer to distinguish shutdown journal abort from other
error cases. So the ESHUTDOWN should be taken precedence over any other
errno which has already been recoded after EXT4_FLAGS_SHUTDOWN is set,
but it only update errno in the journal suoerblock now if the old errno
is 0.

Fixes: fb7c02445c49 ("ext4: pass -ESHUTDOWN code to jbd2 layer")
Signed-off-by: zhangyi (F) <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>
fs/jbd2/journal.c

index 9e9275540071a7d703ef8775274d38dff8dfd692..a821c469cab6de36f96846c4b7e461a2348da66e 100644 (file)
@@ -2147,8 +2147,7 @@ static void __journal_abort_soft (journal_t *journal, int errno)
 
        if (journal->j_flags & JBD2_ABORT) {
                write_unlock(&journal->j_state_lock);
-               if (!old_errno && old_errno != -ESHUTDOWN &&
-                   errno == -ESHUTDOWN)
+               if (old_errno != -ESHUTDOWN && errno == -ESHUTDOWN)
                        jbd2_journal_update_sb_errno(journal);
                return;
        }
This page took 0.061177 seconds and 4 git commands to generate.