[PATCH] 03/05 move last_merge handlin into generic elevator code

Currently, both generic elevator code and specific ioscheds
participate in the management and usage of last_merge.  This
and the following patches move last_merge handling into
generic elevator code.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
This commit is contained in:
Tejun Heo
2005-10-20 16:46:23 +02:00
committed by Jens Axboe
parent b4878f245e
commit 06b86245c0
2 changed files with 21 additions and 25 deletions

View File

@ -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);