fs: ext4: Do not print mount fail message when not ext4 filesystem
authorMarek BehĂșn <marek.behun@nic.cz>
Wed, 7 Mar 2018 23:26:08 +0000 (00:26 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 9 Mar 2018 17:31:07 +0000 (12:31 -0500)
Other filesystem drivers don't do this.

Signed-off-by: Marek Behun <marek.behun@nic.cz>
fs/ext4/ext4_common.c

index dac95453650c042ef2cc071b9a6ac94a8f007d5f..e3cc30a1e0ae73b3741d26662b90a5efb211ee98 100644 (file)
@@ -2343,7 +2343,7 @@ int ext4fs_mount(unsigned part_length)
 
        /* Make sure this is an ext2 filesystem. */
        if (le16_to_cpu(data->sblock.magic) != EXT2_MAGIC)
-               goto fail;
+               goto fail_noerr;
 
 
        if (le32_to_cpu(data->sblock.revision_level) == 0) {
@@ -2379,6 +2379,7 @@ int ext4fs_mount(unsigned part_length)
        return 1;
 fail:
        printf("Failed to mount ext2 filesystem...\n");
+fail_noerr:
        free(data);
        ext4fs_root = NULL;