OSDN Git Service

btrfs: simplify how changed fsid and metadata_uuid is checked
authorAnand Jain <anand.jain@oracle.com>
Wed, 24 May 2023 12:02:41 +0000 (20:02 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2023 11:59:29 +0000 (13:59 +0200)
commita3c54b0be1a218bdd8e42abf9ecfd9bddf1eadee
treebac70e6965152c511321e56adfd46d6eaee14bc6
parent1a8983450090c97bdc498d021fd74fc7e42cc38c
btrfs: simplify how changed fsid and metadata_uuid is checked

We often check if the metadata_uuid is not the same as fsid, and then we
check if the given fsid matches the metadata_uuid. This patch refactors
this logic into function match_fsid_changed and utilize it.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c