We're specifically prohibited from removing the last device in a file
system, so this check is meaningless and the code can be deleted.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
fs/btrfs/volumes.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 86846d6e58d0..373be4e54f28 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2199,13 +2199,6 @@ int btrfs_rm_device(struct btrfs_fs_info *fs_info, const char *device_path,
btrfs_close_bdev(device);
synchronize_rcu();
btrfs_free_device(device);
-
- if (cur_devices->open_devices == 0) {
- list_del_init(&cur_devices->seed_list);
- close_fs_devices(cur_devices);
- free_fs_devices(cur_devices);
- }
-
out:
mutex_unlock(&uuid_mutex);
return ret;--
2.26.3