Skip to content

Commit

Permalink
ext4: handle error of ext4_setup_system_zone() on remount
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jankara authored and tytso committed Aug 7, 2020
1 parent 9375ac7 commit d176b1f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d176b1f

Please sign in to comment.