Skip to contentSkip to conversation

btrfs: remove assert in btrfs_init_dev_replace_tgtdev()

PATCH In review Anand Jain 2 participants 2 messages Feb 20, 2018 – Feb 23, 2018 Btrfs file system

lore
Share & tools
lore

Anand Jain

author
#0 lore raw

PATCH 1/1 btrfs: remove assert in btrfs_init_dev_replace_tgtdev()

In the same function we just ran btrfs_alloc_device() which means the btrfs_device::resized_list is sure to be empty and we are protected with the btrfs_fs_info::volume_mutex.

---
 fs/btrfs/volumes.c | 1 -
 1 file changed, 1 deletion(-)
fs/btrfs/volumes.c +0 -1
index d4a5f9126e7b..ac29ec0de984 100644
@@ -2655,7 +2655,6 @@ int btrfs_init_dev_replace_tgtdev(struct btrfs_fs_info *fs_info,
 	device->total_bytes = btrfs_device_get_total_bytes(srcdev);
 	device->disk_total_bytes = btrfs_device_get_disk_total_bytes(srcdev);
 	device->bytes_used = btrfs_device_get_bytes_used(srcdev);
-	ASSERT(list_empty(&srcdev->resized_list));
 	device->commit_total_bytes = srcdev->commit_total_bytes;
 	device->commit_bytes_used = device->bytes_used;
 	device->fs_info = fs_info;
Signature · 1 line
2.15.0