diff options
author | Jan Kara <jack@suse.cz> | 2021-03-17 17:44:12 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-24 10:59:21 +0100 |
commit | d01b5fc061683e8fc28499b283fab39838730c9b (patch) | |
tree | a9d4f163c8c652f45aa99a59bcac65a047ad6171 /fs | |
parent | 1ba8eed749a47a26e28fd1cb745d0dc9688d0ed8 (diff) | |
download | linux-stable-d01b5fc061683e8fc28499b283fab39838730c9b.tar.gz linux-stable-d01b5fc061683e8fc28499b283fab39838730c9b.tar.bz2 linux-stable-d01b5fc061683e8fc28499b283fab39838730c9b.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.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 84d28d3efc60..f70c5541d718 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -5148,7 +5148,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); |