ext4: correctly restore system zone info when remount fails
authorJan Kara <jack@suse.cz>
Tue, 28 Jul 2020 13:04:37 +0000 (15:04 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 7 Aug 2020 18:12:37 +0000 (14:12 -0400)
commit0f5bde1db174f6c471f0bd27198575719dabe3e5
treebf8b4e6d02df5868ce5b3d22ef172c2b22070228
parente7bfb5c9bb3d63cb2abb3ceaf1a429d9f02f942d
ext4: correctly restore system zone info when remount fails

When remounting filesystem fails late during remount handling and
block_validity mount option is also changed during the remount, we fail
to restore system zone information to a state matching the mount option.
This is mostly harmless, just the block validity checking will not match
the situation described by the mount option. Make sure these two are always
consistent.

Reported-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20200728130437.7804-7-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/block_validity.c
fs/ext4/super.c