From f19866e5cb04f8f007cb422132ea4611cdacc8e3 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Thu, 8 Oct 2015 08:28:26 -0300 Subject: Linux-libre 4.2.3-gnu --- block/blk-mq-tag.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'block/blk-mq-tag.h') diff --git a/block/blk-mq-tag.h b/block/blk-mq-tag.h index 75893a342..9eb2cf4f0 100644 --- a/block/blk-mq-tag.h +++ b/block/blk-mq-tag.h @@ -89,4 +89,16 @@ static inline void blk_mq_tag_idle(struct blk_mq_hw_ctx *hctx) __blk_mq_tag_idle(hctx); } +/* + * This helper should only be used for flush request to share tag + * with the request cloned from, and both the two requests can't be + * in flight at the same time. The caller has to make sure the tag + * can't be freed. + */ +static inline void blk_mq_tag_set_rq(struct blk_mq_hw_ctx *hctx, + unsigned int tag, struct request *rq) +{ + hctx->tags->rqs[tag] = rq; +} + #endif -- cgit v1.2.3-54-g00ecf