OSDN Git Service

ext4: pass -ESHUTDOWN code to jbd2 layer
authorTheodore Ts'o <tytso@mit.edu>
Mon, 19 Feb 2018 04:45:18 +0000 (23:45 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 19 Feb 2018 04:45:18 +0000 (23:45 -0500)
commitfb7c02445c497943e7296cd3deee04422b63acb8
treea324e598b3ad8c07e0f9d94b48389094cd2f298a
parenta6d9946bb925293fda9f5ed6d33d8580b001f006
ext4: pass -ESHUTDOWN code to jbd2 layer

Previously the jbd2 layer assumed that a file system check would be
required after a journal abort.  In the case of the deliberate file
system shutdown, this should not be necessary.  Allow the jbd2 layer
to distinguish between these two cases by using the ESHUTDOWN errno.

Also add proper locking to __journal_abort_soft().

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
fs/ext4/ioctl.c
fs/jbd2/journal.c