Commit 32576040 authored by Anand Jain's avatar Anand Jain Committed by David Sterba

Btrfs: rename btrfs_kobj_rm_device to btrfs_sysfs_rm_device_link

Signed-off-by: default avatarAnand Jain <anand.jain@oracle.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent e3bd6973
...@@ -586,7 +586,7 @@ static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info, ...@@ -586,7 +586,7 @@ static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info,
mutex_unlock(&uuid_mutex); mutex_unlock(&uuid_mutex);
/* replace the sysfs entry */ /* replace the sysfs entry */
btrfs_kobj_rm_device(fs_info->fs_devices, src_device); btrfs_sysfs_rm_device_link(fs_info->fs_devices, src_device);
btrfs_rm_dev_replace_free_srcdev(fs_info, src_device); btrfs_rm_dev_replace_free_srcdev(fs_info, src_device);
/* write back the superblocks */ /* write back the superblocks */
......
...@@ -557,7 +557,7 @@ void btrfs_sysfs_remove_mounted(struct btrfs_fs_info *fs_info) ...@@ -557,7 +557,7 @@ void btrfs_sysfs_remove_mounted(struct btrfs_fs_info *fs_info)
addrm_unknown_feature_attrs(fs_info, false); addrm_unknown_feature_attrs(fs_info, false);
sysfs_remove_group(&fs_info->fs_devices->super_kobj, &btrfs_feature_attr_group); sysfs_remove_group(&fs_info->fs_devices->super_kobj, &btrfs_feature_attr_group);
sysfs_remove_files(&fs_info->fs_devices->super_kobj, btrfs_attrs); sysfs_remove_files(&fs_info->fs_devices->super_kobj, btrfs_attrs);
btrfs_kobj_rm_device(fs_info->fs_devices, NULL); btrfs_sysfs_rm_device_link(fs_info->fs_devices, NULL);
} }
const char * const btrfs_feature_set_names[3] = { const char * const btrfs_feature_set_names[3] = {
...@@ -637,7 +637,7 @@ static void init_feature_attrs(void) ...@@ -637,7 +637,7 @@ static void init_feature_attrs(void)
/* when one_device is NULL, it removes all device links */ /* when one_device is NULL, it removes all device links */
int btrfs_kobj_rm_device(struct btrfs_fs_devices *fs_devices, int btrfs_sysfs_rm_device_link(struct btrfs_fs_devices *fs_devices,
struct btrfs_device *one_device) struct btrfs_device *one_device)
{ {
struct hd_struct *disk; struct hd_struct *disk;
...@@ -750,7 +750,7 @@ int btrfs_sysfs_add_mounted(struct btrfs_fs_info *fs_info) ...@@ -750,7 +750,7 @@ int btrfs_sysfs_add_mounted(struct btrfs_fs_info *fs_info)
error = sysfs_create_files(super_kobj, btrfs_attrs); error = sysfs_create_files(super_kobj, btrfs_attrs);
if (error) { if (error) {
btrfs_kobj_rm_device(fs_devs, NULL); btrfs_sysfs_rm_device_link(fs_devs, NULL);
return error; return error;
} }
......
...@@ -84,7 +84,7 @@ extern struct kobj_type space_info_ktype; ...@@ -84,7 +84,7 @@ extern struct kobj_type space_info_ktype;
extern struct kobj_type btrfs_raid_ktype; extern struct kobj_type btrfs_raid_ktype;
int btrfs_sysfs_add_device_link(struct btrfs_fs_devices *fs_devices, int btrfs_sysfs_add_device_link(struct btrfs_fs_devices *fs_devices,
struct btrfs_device *one_device); struct btrfs_device *one_device);
int btrfs_kobj_rm_device(struct btrfs_fs_devices *fs_devices, int btrfs_sysfs_rm_device_link(struct btrfs_fs_devices *fs_devices,
struct btrfs_device *one_device); struct btrfs_device *one_device);
int btrfs_sysfs_add_fsid(struct btrfs_fs_devices *fs_devs, int btrfs_sysfs_add_fsid(struct btrfs_fs_devices *fs_devs,
struct kobject *parent); struct kobject *parent);
......
...@@ -1801,7 +1801,7 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path) ...@@ -1801,7 +1801,7 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path)
if (device->bdev) { if (device->bdev) {
device->fs_devices->open_devices--; device->fs_devices->open_devices--;
/* remove sysfs entry */ /* remove sysfs entry */
btrfs_kobj_rm_device(root->fs_info->fs_devices, device); btrfs_sysfs_rm_device_link(root->fs_info->fs_devices, device);
} }
call_rcu(&device->rcu, free_device); call_rcu(&device->rcu, free_device);
...@@ -1971,7 +1971,7 @@ void btrfs_destroy_dev_replace_tgtdev(struct btrfs_fs_info *fs_info, ...@@ -1971,7 +1971,7 @@ void btrfs_destroy_dev_replace_tgtdev(struct btrfs_fs_info *fs_info,
WARN_ON(!tgtdev); WARN_ON(!tgtdev);
mutex_lock(&fs_info->fs_devices->device_list_mutex); mutex_lock(&fs_info->fs_devices->device_list_mutex);
btrfs_kobj_rm_device(fs_info->fs_devices, tgtdev); btrfs_sysfs_rm_device_link(fs_info->fs_devices, tgtdev);
if (tgtdev->bdev) { if (tgtdev->bdev) {
btrfs_scratch_superblock(tgtdev); btrfs_scratch_superblock(tgtdev);
...@@ -2388,7 +2388,7 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path) ...@@ -2388,7 +2388,7 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path)
error_trans: error_trans:
btrfs_end_transaction(trans, root); btrfs_end_transaction(trans, root);
rcu_string_free(device->name); rcu_string_free(device->name);
btrfs_kobj_rm_device(root->fs_info->fs_devices, device); btrfs_sysfs_rm_device_link(root->fs_info->fs_devices, device);
kfree(device); kfree(device);
error: error:
blkdev_put(bdev, FMODE_EXCL); blkdev_put(bdev, FMODE_EXCL);
......
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