aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/ll_rw_blk.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 3887b2a33ed0..8054b7d8e07c 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -1862,9 +1862,7 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)
1862 1862
1863 init_timer(&q->unplug_timer); 1863 init_timer(&q->unplug_timer);
1864 1864
1865 kobject_set_name(&q->kobj, "%s", "queue"); 1865 kobject_init_ng(&q->kobj, &queue_ktype);
1866 q->kobj.ktype = &queue_ktype;
1867 kobject_init(&q->kobj);
1868 1866
1869 mutex_init(&q->sysfs_lock); 1867 mutex_init(&q->sysfs_lock);
1870 1868
@@ -4182,9 +4180,8 @@ int blk_register_queue(struct gendisk *disk)
4182 if (!q || !q->request_fn) 4180 if (!q || !q->request_fn)
4183 return -ENXIO; 4181 return -ENXIO;
4184 4182
4185 q->kobj.parent = kobject_get(&disk->dev.kobj); 4183 ret = kobject_add_ng(&q->kobj, kobject_get(&disk->dev.kobj),
4186 4184 "%s", "queue");
4187 ret = kobject_add(&q->kobj);
4188 if (ret < 0) 4185 if (ret < 0)
4189 return ret; 4186 return ret;
4190 4187