diff options
author | Ming Lei <tom.leiming@gmail.com> | 2017-02-22 11:14:00 +0100 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-03-08 17:56:12 +0100 |
commit | 7ea5fe31c12dd8bcf4a9c5a4a7e8e23826a9a3b8 (patch) | |
tree | 6a9e862fb8ceccf5c64663630d5c2df1f5535656 /block/blk-mq.h | |
parent | blk-mq: initialize mq kobjects in blk_mq_init_allocated_queue() (diff) | |
download | linux-7ea5fe31c12dd8bcf4a9c5a4a7e8e23826a9a3b8.tar.xz linux-7ea5fe31c12dd8bcf4a9c5a4a7e8e23826a9a3b8.zip |
blk-mq: make lifetime consitent between q/ctx and its kobject
Currently from kobject view, both q->mq_kobj and ctx->kobj can
be released during one cycle of blk_mq_register_dev() and
blk_mq_unregister_dev(). Actually, sw queue's lifetime is
same with its request queue's, which is covered by request_queue->kobj.
So we don't need to call kobject_put() for the two kinds of
kobject in __blk_mq_unregister_dev(), instead we do that
in release handler of request queue.
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Tested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq.h')
-rw-r--r-- | block/blk-mq.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h index ad8bfd7473ef..b79f9a7d8cf6 100644 --- a/block/blk-mq.h +++ b/block/blk-mq.h @@ -78,6 +78,7 @@ static inline struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *q, * sysfs helpers */ extern void blk_mq_sysfs_init(struct request_queue *q); +extern void blk_mq_sysfs_deinit(struct request_queue *q); extern int blk_mq_sysfs_register(struct request_queue *q); extern void blk_mq_sysfs_unregister(struct request_queue *q); extern void blk_mq_hctx_kobj_init(struct blk_mq_hw_ctx *hctx); |