]> git.baikalelectronics.ru Git - kernel.git/commit
jbd2: make sure ESHUTDOWN to be recorded in the journal superblock
authorzhangyi (F) <yi.zhang@huawei.com>
Wed, 4 Dec 2019 12:46:13 +0000 (20:46 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 25 Jan 2020 08:00:20 +0000 (03:00 -0500)
commit7fdd952d807ca4640a0946825a7ba86417f891a2
tree5acdd78d124196de0d1a90ee8d207d16710f4e3a
parentf0c2298fe7ea36c028c37f675781b37ce5459a38
jbd2: make sure ESHUTDOWN to be recorded in the journal superblock

Commit 8a0663d9d69f ("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: 8a0663d9d69f ("ext4: pass -ESHUTDOWN code to jbd2 layer")
Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20191204124614.45424-4-yi.zhang@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/jbd2/journal.c