Commit f06c5965 authored by David Sterba's avatar David Sterba

btrfs: rename device free rcu helper to free_device_rcu

Make it clear that it is an RCU helper, we want to use the name
free_device for a wrapper freeing all device members.
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 4c274bc6
...@@ -824,7 +824,7 @@ void btrfs_close_extra_devices(struct btrfs_fs_devices *fs_devices, int step) ...@@ -824,7 +824,7 @@ void btrfs_close_extra_devices(struct btrfs_fs_devices *fs_devices, int step)
mutex_unlock(&uuid_mutex); mutex_unlock(&uuid_mutex);
} }
static void free_device(struct rcu_head *head) static void free_device_rcu(struct rcu_head *head)
{ {
struct btrfs_device *device; struct btrfs_device *device;
...@@ -906,7 +906,7 @@ static int __btrfs_close_devices(struct btrfs_fs_devices *fs_devices) ...@@ -906,7 +906,7 @@ static int __btrfs_close_devices(struct btrfs_fs_devices *fs_devices)
struct btrfs_device, dev_list); struct btrfs_device, dev_list);
list_del(&device->dev_list); list_del(&device->dev_list);
btrfs_close_bdev(device); btrfs_close_bdev(device);
call_rcu(&device->rcu, free_device); call_rcu(&device->rcu, free_device_rcu);
} }
WARN_ON(fs_devices->open_devices); WARN_ON(fs_devices->open_devices);
...@@ -1938,7 +1938,7 @@ int btrfs_rm_device(struct btrfs_fs_info *fs_info, const char *device_path, ...@@ -1938,7 +1938,7 @@ int btrfs_rm_device(struct btrfs_fs_info *fs_info, const char *device_path,
btrfs_scratch_superblocks(device->bdev, device->name->str); btrfs_scratch_superblocks(device->bdev, device->name->str);
btrfs_close_bdev(device); btrfs_close_bdev(device);
call_rcu(&device->rcu, free_device); call_rcu(&device->rcu, free_device_rcu);
if (cur_devices->open_devices == 0) { if (cur_devices->open_devices == 0) {
struct btrfs_fs_devices *fs_devices; struct btrfs_fs_devices *fs_devices;
...@@ -2010,7 +2010,7 @@ void btrfs_rm_dev_replace_free_srcdev(struct btrfs_fs_info *fs_info, ...@@ -2010,7 +2010,7 @@ void btrfs_rm_dev_replace_free_srcdev(struct btrfs_fs_info *fs_info,
} }
btrfs_close_bdev(srcdev); btrfs_close_bdev(srcdev);
call_rcu(&srcdev->rcu, free_device); call_rcu(&srcdev->rcu, free_device_rcu);
/* if this is no devs we rather delete the fs_devices */ /* if this is no devs we rather delete the fs_devices */
if (!fs_devices->num_devices) { if (!fs_devices->num_devices) {
...@@ -2069,7 +2069,7 @@ void btrfs_destroy_dev_replace_tgtdev(struct btrfs_fs_info *fs_info, ...@@ -2069,7 +2069,7 @@ void btrfs_destroy_dev_replace_tgtdev(struct btrfs_fs_info *fs_info,
btrfs_scratch_superblocks(tgtdev->bdev, tgtdev->name->str); btrfs_scratch_superblocks(tgtdev->bdev, tgtdev->name->str);
btrfs_close_bdev(tgtdev); btrfs_close_bdev(tgtdev);
call_rcu(&tgtdev->rcu, free_device); call_rcu(&tgtdev->rcu, free_device_rcu);
} }
static int btrfs_find_device_by_path(struct btrfs_fs_info *fs_info, static int btrfs_find_device_by_path(struct btrfs_fs_info *fs_info,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment