diff options
-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) | |||
1562 | clear_super = true; | 1562 | clear_super = true; |
1563 | } | 1563 | } |
1564 | 1564 | ||
1565 | mutex_unlock(&uuid_mutex); | ||
1565 | ret = btrfs_shrink_device(device, 0); | 1566 | ret = btrfs_shrink_device(device, 0); |
1567 | mutex_lock(&uuid_mutex); | ||
1566 | if (ret) | 1568 | if (ret) |
1567 | goto error_undo; | 1569 | goto error_undo; |
1568 | 1570 | ||