Skip to content

Commit 5adacca

Browse files
yangerkuntytso
authored andcommitted
ext4: stop overwrite the errcode in ext4_setup_super
Now the errcode from ext4_commit_super will overwrite EROFS exists in ext4_setup_super. Actually, no need to call ext4_commit_super since we will return EROFS. Fix it by goto done directly. Fixes: c89128a ("ext4: handle errors on ext4_commit_super") Signed-off-by: yangerkun <[email protected]> Reviewed-by: Jan Kara <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent cfb3c85 commit 5adacca

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/ext4/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2412,6 +2412,7 @@ static int ext4_setup_super(struct super_block *sb, struct ext4_super_block *es,
24122412
ext4_msg(sb, KERN_ERR, "revision level too high, "
24132413
"forcing read-only mode");
24142414
err = -EROFS;
2415+
goto done;
24152416
}
24162417
if (read_only)
24172418
goto done;

0 commit comments

Comments
 (0)