summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/blkdev.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index a2e496f285a..bd55b1df899 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -630,6 +630,9 @@ static inline void blkdev_dequeue_request(struct request *req)
static inline void elv_dispatch_add_tail(struct request_queue *q,
struct request *rq)
{
+ if (q->last_merge == rq)
+ q->last_merge = NULL;
+
q->end_sector = rq_end_sector(rq);
q->boundary_rq = rq;
list_add_tail(&rq->queuelist, &q->queue_head);