Skip to content
Commit 6c8b232e authored by Ming Lei's avatar Ming Lei Committed by Jens Axboe
Browse files

blk-mq: make lifetime consistent between hctx and its kobject



This patch removes kobject_put() over hctx in __blk_mq_unregister_dev(),
and trys to keep lifetime consistent between hctx and hctx's kobject.

Now blk_mq_sysfs_register() and blk_mq_sysfs_unregister() become
totally symmetrical, and kobject's refcounter drops to zero just
when the hctx is freed.

Signed-off-by: default avatarMing Lei <tom.leiming@gmail.com>
Tested-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 7ea5fe31
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment