From: Carey Underwood Date: Mon, 4 Mar 2013 22:37:06 +0000 (-0600) Subject: Btrfs: Release uuid_mutex for shrink during device delete X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d790155457a830d064d57e742521f114d3c38108;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Btrfs: Release uuid_mutex for shrink during device delete Device scanning waits on the uuid_mutex, which can result in a very long wait if dev delete is shrinking the device. Signed-off-by: Carey Underwood Reviewed-by: David Sterba Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 78b871753cb6..b5c2b6acbf60 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -1562,7 +1562,9 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path) clear_super = true; } + mutex_unlock(&uuid_mutex); ret = btrfs_shrink_device(device, 0); + mutex_lock(&uuid_mutex); if (ret) goto error_undo;