btrfs: refactor locked condition in btrfs_init_new_device
authorNikolay Borisov <nborisov@suse.com>
Wed, 22 Jul 2020 08:09:23 +0000 (11:09 +0300)
committerDavid Sterba <dsterba@suse.com>
Wed, 7 Oct 2020 10:12:15 +0000 (12:12 +0200)
commit44cab9ba374a0341e12c024f43a83e12ec4978fd
treef86c60a5f9bf60d4812c9dee233ae63372ec5622
parentf4cfa9bdd40c038ac901fbf3c57ab63e9e8eb949
btrfs: refactor locked condition in btrfs_init_new_device

Invert unlocked to locked and exploit the fact it can only ever be
modified if we are adding a new device to a seed filesystem. This allows
to simplify the check in error: label. No semantics changes.

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