summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2021-03-17 17:44:12 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-24 10:56:59 +0100
commitb832b73d3f515dbf3accd7f7fc9da26a91981781 (patch)
treea67a492ae92d39946ca15c8cd69fd1ef96b22305 /fs
parent36d46dd7a4885e1b02d52c918ec3a898e4409e49 (diff)
downloadlinux-stable-b832b73d3f515dbf3accd7f7fc9da26a91981781.tar.gz
linux-stable-b832b73d3f515dbf3accd7f7fc9da26a91981781.tar.bz2
linux-stable-b832b73d3f515dbf3accd7f7fc9da26a91981781.zip
ext4: handle error of ext4_setup_system_zone() on remount
commit d176b1f62f242ab259ff665a26fbac69db1aecba upstream. ext4_setup_system_zone() can fail. Handle the failure in ext4_remount(). Reviewed-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20200728130437.7804-2-jack@suse.cz Signed-off-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/super.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 7a5a1602ee01..d4ecae25d807 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4968,7 +4968,10 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
ext4_register_li_request(sb, first_not_zeroed);
}
- ext4_setup_system_zone(sb);
+ err = ext4_setup_system_zone(sb);
+ if (err)
+ goto restore_opts;
+
if (sbi->s_journal == NULL && !(old_sb_flags & MS_RDONLY))
ext4_commit_super(sb, 1);