Skip to content

Commit f0bb547

Browse files
asjkdave
authored andcommitted
btrfs: remove redundant release of btrfs_device::alloc_state
Commit 321f69f ("btrfs: reset device back to allocation state when removing") included adding extent_io_tree_release(&device->alloc_state) to btrfs_close_one_device(), which had already been called in btrfs_free_device(). The alloc_state tree (IO_TREE_DEVICE_ALLOC_STATE), is created in btrfs_alloc_device() and released in btrfs_close_one_device(). Therefore, the additional call to extent_io_tree_release(&device->alloc_state) in btrfs_free_device() is unnecessary and can be removed. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 1f16033 commit f0bb547

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

fs/btrfs/volumes.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,6 @@ void btrfs_free_device(struct btrfs_device *device)
395395
{
396396
WARN_ON(!list_empty(&device->post_commit_list));
397397
rcu_string_free(device->name);
398-
extent_io_tree_release(&device->alloc_state);
399398
btrfs_destroy_dev_zone_info(device);
400399
kfree(device);
401400
}

0 commit comments

Comments
 (0)