summaryrefslogtreecommitdiffstats
path: root/block/blk-mq-tag.h
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2014-06-01 00:43:37 +0800
committerJens Axboe <axboe@fb.com>2014-06-03 21:04:39 -0600
commitcb96a42cc1f50ba1c7b1e9b2343bec80b926107f (patch)
treec69f953fcd7d04288903abe73a0f92f155882bfd /block/blk-mq-tag.h
parent1aecfe4887713838c79bc52f774609a57db4f988 (diff)
downloadlinux-cb96a42cc1f50ba1c7b1e9b2343bec80b926107f.tar.gz
linux-cb96a42cc1f50ba1c7b1e9b2343bec80b926107f.tar.bz2
linux-cb96a42cc1f50ba1c7b1e9b2343bec80b926107f.zip
blk-mq: fix schedule from atomic context
blk_mq_put_ctx() has to be called before io_schedule() in bt_get(). This patch fixes the problem by taking similar approach from percpu_ida allocation for the situation. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq-tag.h')
-rw-r--r--block/blk-mq-tag.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-mq-tag.h b/block/blk-mq-tag.h
index c959de58d2a5..98696a65d4d4 100644
--- a/block/blk-mq-tag.h
+++ b/block/blk-mq-tag.h
@@ -48,7 +48,7 @@ struct blk_mq_tags {
extern struct blk_mq_tags *blk_mq_init_tags(unsigned int nr_tags, unsigned int reserved_tags, int node);
extern void blk_mq_free_tags(struct blk_mq_tags *tags);
-extern unsigned int blk_mq_get_tag(struct blk_mq_hw_ctx *hctx, unsigned int *last_tag, gfp_t gfp, bool reserved);
+extern unsigned int blk_mq_get_tag(struct blk_mq_alloc_data *data);
extern void blk_mq_put_tag(struct blk_mq_hw_ctx *hctx, unsigned int tag, unsigned int *last_tag);
extern bool blk_mq_has_free_tags(struct blk_mq_tags *tags);
extern ssize_t blk_mq_tag_sysfs_show(struct blk_mq_tags *tags, char *page);