btrfs: lift uuid_mutex to callers of btrfs_open_devices
authorDavid Sterba <dsterba@suse.com>
Tue, 19 Jun 2018 15:09:47 +0000 (17:09 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 6 Aug 2018 11:12:47 +0000 (13:12 +0200)
commitf5194e34cabaddd348a90f950e0a8188dd26cdc0
tree8a7b478717ccb4bb87575d1594d437adebb552e3
parent899f9307c33ce4758c30a076b10ed54d5c91c6e7
btrfs: lift uuid_mutex to callers of btrfs_open_devices

Prepartory work to fix race between mount and device scan.

The callers will have to manage the critical section, eg. mount wants to
scan and then call btrfs_open_devices without the ioctl scan walking in
and modifying the fs devices in the meantime.

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