diff options
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 07ab75403e1a..2998fe3a2377 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -643,7 +643,7 @@ static inline void blk_free_request(struct request_queue *q, struct request *rq) | |||
643 | } | 643 | } |
644 | 644 | ||
645 | static struct request * | 645 | static struct request * |
646 | blk_alloc_request(struct request_queue *q, int rw, int priv, gfp_t gfp_mask) | 646 | blk_alloc_request(struct request_queue *q, int flags, int priv, gfp_t gfp_mask) |
647 | { | 647 | { |
648 | struct request *rq = mempool_alloc(q->rq.rq_pool, gfp_mask); | 648 | struct request *rq = mempool_alloc(q->rq.rq_pool, gfp_mask); |
649 | 649 | ||
@@ -652,7 +652,7 @@ blk_alloc_request(struct request_queue *q, int rw, int priv, gfp_t gfp_mask) | |||
652 | 652 | ||
653 | blk_rq_init(q, rq); | 653 | blk_rq_init(q, rq); |
654 | 654 | ||
655 | rq->cmd_flags = rw | REQ_ALLOCED; | 655 | rq->cmd_flags = flags | REQ_ALLOCED; |
656 | 656 | ||
657 | if (priv) { | 657 | if (priv) { |
658 | if (unlikely(elv_set_request(q, rq, gfp_mask))) { | 658 | if (unlikely(elv_set_request(q, rq, gfp_mask))) { |
@@ -792,6 +792,8 @@ static struct request *get_request(struct request_queue *q, int rw_flags, | |||
792 | if (priv) | 792 | if (priv) |
793 | rl->elvpriv++; | 793 | rl->elvpriv++; |
794 | 794 | ||
795 | if (blk_queue_io_stat(q)) | ||
796 | rw_flags |= REQ_IO_STAT; | ||
795 | spin_unlock_irq(q->queue_lock); | 797 | spin_unlock_irq(q->queue_lock); |
796 | 798 | ||
797 | rq = blk_alloc_request(q, rw_flags, priv, gfp_mask); | 799 | rq = blk_alloc_request(q, rw_flags, priv, gfp_mask); |