diff options
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r-- | block/blk-sysfs.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index b78c9c3e2670..8a6d81afb284 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c | |||
@@ -452,6 +452,7 @@ int blk_register_queue(struct gendisk *disk) | |||
452 | if (ret) { | 452 | if (ret) { |
453 | kobject_uevent(&q->kobj, KOBJ_REMOVE); | 453 | kobject_uevent(&q->kobj, KOBJ_REMOVE); |
454 | kobject_del(&q->kobj); | 454 | kobject_del(&q->kobj); |
455 | blk_trace_remove_sysfs(disk_to_dev(disk)); | ||
455 | return ret; | 456 | return ret; |
456 | } | 457 | } |
457 | 458 | ||
@@ -465,11 +466,11 @@ void blk_unregister_queue(struct gendisk *disk) | |||
465 | if (WARN_ON(!q)) | 466 | if (WARN_ON(!q)) |
466 | return; | 467 | return; |
467 | 468 | ||
468 | if (q->request_fn) { | 469 | if (q->request_fn) |
469 | elv_unregister_queue(q); | 470 | elv_unregister_queue(q); |
470 | 471 | ||
471 | kobject_uevent(&q->kobj, KOBJ_REMOVE); | 472 | kobject_uevent(&q->kobj, KOBJ_REMOVE); |
472 | kobject_del(&q->kobj); | 473 | kobject_del(&q->kobj); |
473 | kobject_put(&disk_to_dev(disk)->kobj); | 474 | blk_trace_remove_sysfs(disk_to_dev(disk)); |
474 | } | 475 | kobject_put(&disk_to_dev(disk)->kobj); |
475 | } | 476 | } |