Skip to content

Commit 761f88f

Browse files
JasonYanHwgregkh
authored andcommitted
ext4: goto right label 'failed_mount3a'
[ Upstream commit 43bd6f1 ] Before these two branches neither loaded the journal nor created the xattr cache. So the right label to goto is 'failed_mount3a'. Although this did not cause any issues because the error handler validated if the pointer is null. However this still made me confused when reading the code. So it's still worth to modify to goto the right label. Signed-off-by: Jason Yan <yanaijie@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Link: https://lore.kernel.org/r/20220916141527.1012715-2-yanaijie@huawei.com Signed-off-by: Theodore Ts'o <tytso@mit.edu> Stable-dep-of: 89481b5 ("ext4: correct inconsistent error msg in nojournal mode") Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent eb16602 commit 761f88f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

fs/ext4/super.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4664,30 +4664,30 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
46644664
ext4_has_feature_journal_needs_recovery(sb)) {
46654665
ext4_msg(sb, KERN_ERR, "required journal recovery "
46664666
"suppressed and not mounted read-only");
4667-
goto failed_mount_wq;
4667+
goto failed_mount3a;
46684668
} else {
46694669
/* Nojournal mode, all journal mount options are illegal */
46704670
if (test_opt2(sb, EXPLICIT_JOURNAL_CHECKSUM)) {
46714671
ext4_msg(sb, KERN_ERR, "can't mount with "
46724672
"journal_checksum, fs mounted w/o journal");
4673-
goto failed_mount_wq;
4673+
goto failed_mount3a;
46744674
}
46754675
if (test_opt(sb, JOURNAL_ASYNC_COMMIT)) {
46764676
ext4_msg(sb, KERN_ERR, "can't mount with "
46774677
"journal_async_commit, fs mounted w/o journal");
4678-
goto failed_mount_wq;
4678+
goto failed_mount3a;
46794679
}
46804680
if (sbi->s_commit_interval != JBD2_DEFAULT_MAX_COMMIT_AGE*HZ) {
46814681
ext4_msg(sb, KERN_ERR, "can't mount with "
46824682
"commit=%lu, fs mounted w/o journal",
46834683
sbi->s_commit_interval / HZ);
4684-
goto failed_mount_wq;
4684+
goto failed_mount3a;
46854685
}
46864686
if (EXT4_MOUNT_DATA_FLAGS &
46874687
(sbi->s_mount_opt ^ sbi->s_def_mount_opt)) {
46884688
ext4_msg(sb, KERN_ERR, "can't mount with "
46894689
"data=, fs mounted w/o journal");
4690-
goto failed_mount_wq;
4690+
goto failed_mount3a;
46914691
}
46924692
sbi->s_def_mount_opt &= ~EXT4_MOUNT_JOURNAL_CHECKSUM;
46934693
clear_opt(sb, JOURNAL_CHECKSUM);

0 commit comments

Comments
 (0)