btrfs: factor out sysfs code for sending device uevent

The device uevent belongs to the sysfs API.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba
2019-08-01 18:50:16 +02:00
父節點 f10152bcc9
當前提交 5b28692e0c
共有 3 個文件被更改,包括 12 次插入13 次删除

查看文件

@@ -358,19 +358,6 @@ static void free_fs_devices(struct btrfs_fs_devices *fs_devices)
kfree(fs_devices);
}
static void btrfs_kobject_uevent(struct block_device *bdev,
enum kobject_action action)
{
int ret;
ret = kobject_uevent(&disk_to_dev(bdev->bd_disk)->kobj, action);
if (ret)
pr_warn("BTRFS: Sending event '%d' to kobject: '%s' (%p): failed\n",
action,
kobject_name(&disk_to_dev(bdev->bd_disk)->kobj),
&disk_to_dev(bdev->bd_disk)->kobj);
}
void __exit btrfs_cleanup_fs_uuids(void)
{
struct btrfs_fs_devices *fs_devices;