ext4: pass -ESHUTDOWN code to jbd2 layer
authorTheodore Ts'o <tytso@mit.edu>
Mon, 19 Feb 2018 04:45:18 +0000 (23:45 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2018 07:36:30 +0000 (09:36 +0200)
commit73297f13a003b97e37a5648bbbecd45323cc0e24
tree0bd249fff9462ca8637d6ab1ddfb9ee4070a8be4
parent09439481998aefbe1bd6ae067079e738ba4a7a3f
ext4: pass -ESHUTDOWN code to jbd2 layer

commit fb7c02445c497943e7296cd3deee04422b63acb8 upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/ioctl.c
fs/jbd2/journal.c