Skip to content

Commit

Permalink
blk-mq: move debugfs_remove() of disk dir to blk_release_queue()
Browse files Browse the repository at this point in the history
This needs to happen after we tear down blktrace.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
osandov authored and axboe committed Feb 2, 2017
1 parent 18fbda9 commit 62ebce1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-mq-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ static void __blk_mq_unregister_dev(struct device *dev, struct request_queue *q)
kobject_put(&hctx->kobj);
}

blk_mq_debugfs_unregister(q);
blk_mq_debugfs_unregister_hctxs(q);

kobject_uevent(&q->mq_kobj, KOBJ_REMOVE);
kobject_del(&q->mq_kobj);
Expand Down
3 changes: 3 additions & 0 deletions block/blk-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,9 @@ static void blk_release_queue(struct kobject *kobj)

blk_trace_shutdown(q);

if (q->mq_ops)
blk_mq_debugfs_unregister(q);

if (q->bio_split)
bioset_free(q->bio_split);

Expand Down

0 comments on commit 62ebce1

Please sign in to comment.