diff options
author | Christoph Hellwig <hch@infradead.org> | 2014-02-20 18:32:37 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-02-21 11:58:48 -0500 |
commit | feb71dae1f9e0aeb056f7f639a21e620d327fc66 (patch) | |
tree | 66097b2fa7e34c826421eb345496d890a6d88ade /block/blk-flush.c | |
parent | fd694131bb033e7b1fd748498cd9a70e9c16420b (diff) |
blk-mq: merge blk_mq_insert_request and blk_mq_run_request
It's almost identical to blk_mq_insert_request, so fold the two into one
slightly more generic function by making the flush special case a bit
smarted.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-flush.c')
-rw-r--r-- | block/blk-flush.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-flush.c b/block/blk-flush.c index 66e2b697f5db..f598f794c3c6 100644 --- a/block/blk-flush.c +++ b/block/blk-flush.c | |||
@@ -137,7 +137,7 @@ static void mq_flush_run(struct work_struct *work) | |||
137 | rq = container_of(work, struct request, mq_flush_work); | 137 | rq = container_of(work, struct request, mq_flush_work); |
138 | 138 | ||
139 | memset(&rq->csd, 0, sizeof(rq->csd)); | 139 | memset(&rq->csd, 0, sizeof(rq->csd)); |
140 | blk_mq_run_request(rq, true, false); | 140 | blk_mq_insert_request(rq, false, true, false); |
141 | } | 141 | } |
142 | 142 | ||
143 | static bool blk_flush_queue_rq(struct request *rq) | 143 | static bool blk_flush_queue_rq(struct request *rq) |
@@ -411,7 +411,7 @@ void blk_insert_flush(struct request *rq) | |||
411 | if ((policy & REQ_FSEQ_DATA) && | 411 | if ((policy & REQ_FSEQ_DATA) && |
412 | !(policy & (REQ_FSEQ_PREFLUSH | REQ_FSEQ_POSTFLUSH))) { | 412 | !(policy & (REQ_FSEQ_PREFLUSH | REQ_FSEQ_POSTFLUSH))) { |
413 | if (q->mq_ops) { | 413 | if (q->mq_ops) { |
414 | blk_mq_run_request(rq, false, true); | 414 | blk_mq_insert_request(rq, false, false, true); |
415 | } else | 415 | } else |
416 | list_add_tail(&rq->queuelist, &q->queue_head); | 416 | list_add_tail(&rq->queuelist, &q->queue_head); |
417 | return; | 417 | return; |