]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ext4: goto right label 'failed_mount3a'
authorJason Yan <yanaijie@huawei.com>
Fri, 16 Sep 2022 14:15:12 +0000 (22:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:54 +0000 (11:41 +0100)
[ Upstream commit 7e6afe685be109455dde989e77ffc614feababcb ]

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: 89481b5fa8c0 ("ext4: correct inconsistent error msg in nojournal mode")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ext4/super.c

index 5fdf584101e609a0b5e3d2488818dd528d040710..e3e616c55d0d0d820867ca44c8c8c0345edf83fa 100644 (file)
@@ -4388,30 +4388,30 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
                   ext4_has_feature_journal_needs_recovery(sb)) {
                ext4_msg(sb, KERN_ERR, "required journal recovery "
                       "suppressed and not mounted read-only");
-               goto failed_mount_wq;
+               goto failed_mount3a;
        } else {
                /* Nojournal mode, all journal mount options are illegal */
                if (test_opt2(sb, EXPLICIT_JOURNAL_CHECKSUM)) {
                        ext4_msg(sb, KERN_ERR, "can't mount with "
                                 "journal_checksum, fs mounted w/o journal");
-                       goto failed_mount_wq;
+                       goto failed_mount3a;
                }
                if (test_opt(sb, JOURNAL_ASYNC_COMMIT)) {
                        ext4_msg(sb, KERN_ERR, "can't mount with "
                                 "journal_async_commit, fs mounted w/o journal");
-                       goto failed_mount_wq;
+                       goto failed_mount3a;
                }
                if (sbi->s_commit_interval != JBD2_DEFAULT_MAX_COMMIT_AGE*HZ) {
                        ext4_msg(sb, KERN_ERR, "can't mount with "
                                 "commit=%lu, fs mounted w/o journal",
                                 sbi->s_commit_interval / HZ);
-                       goto failed_mount_wq;
+                       goto failed_mount3a;
                }
                if (EXT4_MOUNT_DATA_FLAGS &
                    (sbi->s_mount_opt ^ sbi->s_def_mount_opt)) {
                        ext4_msg(sb, KERN_ERR, "can't mount with "
                                 "data=, fs mounted w/o journal");
-                       goto failed_mount_wq;
+                       goto failed_mount3a;
                }
                sbi->s_def_mount_opt &= ~EXT4_MOUNT_JOURNAL_CHECKSUM;
                clear_opt(sb, JOURNAL_CHECKSUM);