]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: lift uuid_mutex to callers of btrfs_scan_one_device
authorDavid Sterba <dsterba@suse.com>
Tue, 19 Jun 2018 14:37:36 +0000 (16:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Sep 2018 07:46:56 +0000 (09:46 +0200)
commit71ddab54bee5c571647fd5ed9bb9be9db305f7c1
tree888651583bf90c8137a664719a4d5002f760115f
parent40ce21951aab62b8cdd6d2b852154d6fe9f11163
btrfs: lift uuid_mutex to callers of btrfs_scan_one_device

[ Upstream commit 899f9307c33ce4758c30a076b10ed54d5c91c6e7 ]

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