diff options
author | Carey Underwood <carey@scaletech.ca> | 2013-03-04 16:37:06 -0600 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-09-01 07:57:21 -0400 |
commit | d790155457a830d064d57e742521f114d3c38108 (patch) | |
tree | 56fc549bfec1f525f04cc5ad5d9f6756e688c7b5 /fs | |
parent | b2aaaa3b8c2153ef17f0e22287acbf8ee31a7c82 (diff) | |
download | kernel-common-d790155457a830d064d57e742521f114d3c38108.tar.gz kernel-common-d790155457a830d064d57e742521f114d3c38108.tar.bz2 kernel-common-d790155457a830d064d57e742521f114d3c38108.zip |
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 <cwillu@cwillu.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/volumes.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |