btrfs: remove wrong use of volume_mutex from btrfs_dev_replace_start
authorDavid Sterba <dsterba@suse.com>
Tue, 20 Mar 2018 22:44:50 +0000 (23:44 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 28 May 2018 16:07:25 +0000 (18:07 +0200)
commita0fecc23718aa9ef020b8c86173a0b783ed37dcf
treee26a3fafb050829e607690236c094dc7d4559c1d
parent149196a2aea682ec9d7d50ec00d779a380deb7aa
btrfs: remove wrong use of volume_mutex from btrfs_dev_replace_start

The volume mutex does not protect against anything in this case, the
comment about scrub is right but not related to locking and looks
confusing. The comment in btrfs_find_device_missing_or_by_path is wrong
and confusing too.

The device_list_mutex is not held here to protect device lookup, but in
this case device replace cannot run in parallel with device removal (due
to exclusive op protection), so we don't need further locking here.

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