summaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2020-07-28 15:04:32 +0200
committerTheodore Ts'o <tytso@mit.edu>2020-08-07 20:12:36 +0200
commitd176b1f62f242ab259ff665a26fbac69db1aecba (patch)
tree63188d5c8b3afd02f2efaa47c4279de1284f8d41 /fs/ext4
parentext4: delete the invalid BUGON in ext4_mb_load_buddy_gfp() (diff)
downloadlinux-d176b1f62f242ab259ff665a26fbac69db1aecba.tar.xz
linux-d176b1f62f242ab259ff665a26fbac69db1aecba.zip
ext4: handle error of ext4_setup_system_zone() on remount
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>
Diffstat (limited to 'fs/ext4')
-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 7deb2b75fcd0..6507e30e58b5 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5747,7 +5747,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 & SB_RDONLY)) {
err = ext4_commit_super(sb, 1);
if (err)