]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ext4: avoid remount errors with 'abort' mount option
authorJan Kara <jack@suse.cz>
Fri, 4 Oct 2024 22:15:56 +0000 (00:15 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 30 Oct 2024 21:42:44 +0000 (17:42 -0400)
commit76486b104168ae59703190566e372badf433314b
tree2d72433dffdd0193430951aaadab12a12d971a30
parent902cc179c931a033cd7f4242353aa2733bf8524c
ext4: avoid remount errors with 'abort' mount option

When we remount filesystem with 'abort' mount option while changing
other mount options as well (as is LTP test doing), we can return error
from the system call after commit d3476f3dad4a ("ext4: don't set
SB_RDONLY after filesystem errors") because the application of mount
option changes detects shutdown filesystem and refuses to do anything.
The behavior of application of other mount options in presence of
'abort' mount option is currently rather arbitary as some mount option
changes are handled before 'abort' and some after it.

Move aborting of the filesystem to the end of remount handling so all
requested changes are properly applied before the filesystem is shutdown
to have a reasonably consistent behavior.

Fixes: d3476f3dad4a ("ext4: don't set SB_RDONLY after filesystem errors")
Reported-by: Jan Stancek <jstancek@redhat.com>
Link: https://lore.kernel.org/all/Zvp6L+oFnfASaoHl@t14s
Signed-off-by: Jan Kara <jack@suse.cz>
Tested-by: Jan Stancek <jstancek@redhat.com>
Link: https://patch.msgid.link/20241004221556.19222-1-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/super.c