summaryrefslogtreecommitdiffstats
path: root/block/blk-mq.h
diff options
context:
space:
mode:
authorMing Lei <ming.lei@canonical.com>2015-01-29 20:17:27 +0800
committerJens Axboe <axboe@fb.com>2015-01-29 08:30:51 -0800
commite09aae7edec1d20824c60a6f0ca4589f99ada17b (patch)
tree1cf7f6b2434f356f9dab4104bd5ecbfa85228799 /block/blk-mq.h
parent74170118b26e55b611de5210f47657118a03a0e1 (diff)
downloadlinux-e09aae7edec1d20824c60a6f0ca4589f99ada17b.tar.gz
linux-e09aae7edec1d20824c60a6f0ca4589f99ada17b.tar.bz2
linux-e09aae7edec1d20824c60a6f0ca4589f99ada17b.zip
blk-mq: release mq's kobjects in blk_release_queue()
The kobject memory inside blk-mq hctx/ctx shouldn't have been freed before the kobject is released because driver core can access it freely before its release. We can't do that in all ctx/hctx/mq_kobj's release handler because it can be run before blk_cleanup_queue(). Given mq_kobj shouldn't have been introduced, this patch simply moves mq's release into blk_release_queue(). Reported-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq.h')
-rw-r--r--block/blk-mq.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h
index 4f4f943c22c3..6a48c4c0d8a2 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -62,6 +62,8 @@ extern void blk_mq_sysfs_unregister(struct request_queue *q);
extern void blk_mq_rq_timed_out(struct request *req, bool reserved);
+void blk_mq_release(struct request_queue *q);
+
/*
* Basic implementation of sparser bitmap, allowing the user to spread
* the bits over more cachelines.