diff options
author | Christoph Hellwig <hch@lst.de> | 2017-02-08 08:46:47 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-02-08 15:43:04 -0500 |
commit | 6cf7677f1a94546e472658290b3b8bdbb16cc045 (patch) | |
tree | eb86076357ae5e6546ff16ada7e3cfcf63c06b91 /block/blk.h | |
parent | 80c6b15732f0d8830032149cbcbc8d67e074b5e8 (diff) |
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 <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk.h')
-rw-r--r-- | block/blk.h | 7 |
1 files changed, 7 insertions, 0 deletions
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) | |||
256 | !blk_rq_is_passthrough(rq); | 256 | !blk_rq_is_passthrough(rq); |
257 | } | 257 | } |
258 | 258 | ||
259 | static inline void req_set_nomerge(struct request_queue *q, struct request *req) | ||
260 | { | ||
261 | req->cmd_flags |= REQ_NOMERGE; | ||
262 | if (req == q->last_merge) | ||
263 | q->last_merge = NULL; | ||
264 | } | ||
265 | |||
259 | /* | 266 | /* |
260 | * Internal io_context interface | 267 | * Internal io_context interface |
261 | */ | 268 | */ |