summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorDavid Sterba2018-03-20 17:20:45 +0100
committerDavid Sterba2018-05-28 18:07:24 +0200
commit72b81abf95ae8d2c78c5f38197f47597cf192d2b (patch)
tree2d71c6d74fd7f3e21672b06a471092641db9844d /fs/btrfs/volumes.c
parentbtrfs: move btrfs_init_dev_replace_tgtdev to dev-replace.c and make static (diff)
downloadkernel-qcow2-linux-72b81abf95ae8d2c78c5f38197f47597cf192d2b.tar.gz
kernel-qcow2-linux-72b81abf95ae8d2c78c5f38197f47597cf192d2b.tar.xz
kernel-qcow2-linux-72b81abf95ae8d2c78c5f38197f47597cf192d2b.zip
btrfs: move volume_mutex to callers of btrfs_rm_device
Move locking and unlocking next to the BTRFS_FS_EXCL_OP bit manipulation so it's obvious that the two happen at the same time. Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r--fs/btrfs/volumes.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 488935e66779..1da46365657b 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -1954,7 +1954,6 @@ int btrfs_rm_device(struct btrfs_fs_info *fs_info, const char *device_path,
u64 num_devices;
int ret = 0;
- mutex_lock(&fs_info->volume_mutex);
mutex_lock(&uuid_mutex);
num_devices = fs_devices->num_devices;
@@ -2068,7 +2067,6 @@ int btrfs_rm_device(struct btrfs_fs_info *fs_info, const char *device_path,
out:
mutex_unlock(&uuid_mutex);
- mutex_unlock(&fs_info->volume_mutex);
return ret;
error_undo: