btrfs: compare the correct fsid/metadata_uuid in btrfs_validate_super
The function btrfs_validate_super() should verify the metadata_uuid in the provided superblock argument. Because, all its callers expect it to do that. Such as in the following stacks: write_all_supers() sb = fs_info->super_for_commit; btrfs_validate_write_super(.., sb) btrfs_validate_super(.., sb, ..) scrub_one_super() btrfs_validate_super(.., sb, ..) And check_dev_super() btrfs_validate_super(.., sb, ..) However, it currently verifies the fs_info::super_copy::metadata_uuid instead. Fix this using the correct metadata_uuid in the superblock argument. CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Tested-by: Guilherme G. Piccoli <gpiccoli@igalia.com> Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
parent
d167aa76
-
mentioned in commit df380d6f
-
mentioned in commit cc87d2bb
-
mentioned in commit ab90a393
-
mentioned in commit b9f0572b
-
mentioned in commit cba491ee
-
mentioned in commit cb3671a2
-
mentioned in commit 5b50c95c
-
mentioned in commit bd0fe548
-
mentioned in commit b61aad18
-
mentioned in commit 2174731a
-
mentioned in commit 31242daa
-
mentioned in commit 10c160fe
-
mentioned in commit 06496c9f
Please register or sign in to comment