diff options
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index b627558c461f..90e1ffdeb415 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -1702,6 +1702,7 @@ EXPORT_SYMBOL_GPL(blk_rq_check_limits); | |||
1702 | int blk_insert_cloned_request(struct request_queue *q, struct request *rq) | 1702 | int blk_insert_cloned_request(struct request_queue *q, struct request *rq) |
1703 | { | 1703 | { |
1704 | unsigned long flags; | 1704 | unsigned long flags; |
1705 | int where = ELEVATOR_INSERT_BACK; | ||
1705 | 1706 | ||
1706 | if (blk_rq_check_limits(q, rq)) | 1707 | if (blk_rq_check_limits(q, rq)) |
1707 | return -EIO; | 1708 | return -EIO; |
@@ -1718,7 +1719,10 @@ int blk_insert_cloned_request(struct request_queue *q, struct request *rq) | |||
1718 | */ | 1719 | */ |
1719 | BUG_ON(blk_queued_rq(rq)); | 1720 | BUG_ON(blk_queued_rq(rq)); |
1720 | 1721 | ||
1721 | add_acct_request(q, rq, ELEVATOR_INSERT_BACK); | 1722 | if (rq->cmd_flags & (REQ_FLUSH|REQ_FUA)) |
1723 | where = ELEVATOR_INSERT_FLUSH; | ||
1724 | |||
1725 | add_acct_request(q, rq, where); | ||
1722 | spin_unlock_irqrestore(q->queue_lock, flags); | 1726 | spin_unlock_irqrestore(q->queue_lock, flags); |
1723 | 1727 | ||
1724 | return 0; | 1728 | return 0; |
@@ -2275,7 +2279,7 @@ static bool blk_end_bidi_request(struct request *rq, int error, | |||
2275 | * %false - we are done with this request | 2279 | * %false - we are done with this request |
2276 | * %true - still buffers pending for this request | 2280 | * %true - still buffers pending for this request |
2277 | **/ | 2281 | **/ |
2278 | static bool __blk_end_bidi_request(struct request *rq, int error, | 2282 | bool __blk_end_bidi_request(struct request *rq, int error, |
2279 | unsigned int nr_bytes, unsigned int bidi_bytes) | 2283 | unsigned int nr_bytes, unsigned int bidi_bytes) |
2280 | { | 2284 | { |
2281 | if (blk_update_bidi_request(rq, error, nr_bytes, bidi_bytes)) | 2285 | if (blk_update_bidi_request(rq, error, nr_bytes, bidi_bytes)) |