Commit 812ab7f3 authored by Jens Axboe's avatar Jens Axboe Committed by Linus Torvalds

[PATCH] noop-iosched: fix insertion point

noop doesn't follow the instructions on where to insert a request,
because it uses q->queue_head instead of the *insert assigned. Clean it
up so it's easier to read.
Signed-off-by: default avatarJens Axboe <axboe@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent cdae7207
...@@ -52,12 +52,10 @@ static void elevator_noop_merge_requests(request_queue_t *q, struct request *req ...@@ -52,12 +52,10 @@ static void elevator_noop_merge_requests(request_queue_t *q, struct request *req
static void elevator_noop_add_request(request_queue_t *q, struct request *rq, static void elevator_noop_add_request(request_queue_t *q, struct request *rq,
int where) int where)
{ {
struct list_head *insert = q->queue_head.prev;
if (where == ELEVATOR_INSERT_FRONT) if (where == ELEVATOR_INSERT_FRONT)
insert = &q->queue_head; list_add(&rq->queuelist, &q->queue_head);
else
list_add_tail(&rq->queuelist, &q->queue_head); list_add_tail(&rq->queuelist, &q->queue_head);
/* /*
* new merges must not precede this barrier * new merges must not precede this barrier
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment