OSDN Git Service

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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Sep 2018 07:46:55 +0000 (09:46 +0200)
commit122fe306d072fbd2e9cce5c89dc34c17da04f3ba
tree1f0c30c9aaf00bcee8ec2b8262ef4220b8f755f6
parentf88b40c1472a3691a942b9e397e62d3be560ad0f
btrfs: lift uuid_mutex to callers of btrfs_open_devices

[ Upstream commit f5194e34cabaddd348a90f950e0a8188dd26cdc0 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/super.c
fs/btrfs/volumes.c