From: Christoph Hellwig Date: Wed, 8 Feb 2017 13:46:47 +0000 (+0100) Subject: block: move req_set_nomerge to blk.h X-Git-Tag: v4.11-rc1~142^2^2~13 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6cf7677f1a94546e472658290b3b8bdbb16cc045;p=karo-tx-linux.git block: move req_set_nomerge to blk.h This makes it available outside of blk-merge.c, and inlining such a trivial helper seems pretty useful to start with. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe --- diff --git a/block/blk-merge.c b/block/blk-merge.c index a373416dbc9a..c956d9e7aafd 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -482,13 +482,6 @@ int blk_rq_map_sg(struct request_queue *q, struct request *rq, } EXPORT_SYMBOL(blk_rq_map_sg); -static void req_set_nomerge(struct request_queue *q, struct request *req) -{ - req->cmd_flags |= REQ_NOMERGE; - if (req == q->last_merge) - q->last_merge = NULL; -} - static inline int ll_new_hw_segment(struct request_queue *q, struct request *req, struct bio *bio) diff --git a/block/blk.h b/block/blk.h index 4972b98d47e1..3e08703902a9 100644 --- a/block/blk.h +++ b/block/blk.h @@ -256,6 +256,13 @@ static inline int blk_do_io_stat(struct request *rq) !blk_rq_is_passthrough(rq); } +static inline void req_set_nomerge(struct request_queue *q, struct request *req) +{ + req->cmd_flags |= REQ_NOMERGE; + if (req == q->last_merge) + q->last_merge = NULL; +} + /* * Internal io_context interface */