diff options
| author | Jens Axboe <axboe@suse.de> | 2005-01-13 18:26:02 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-13 18:26:02 -0800 |
| commit | 812ab7f31be1ebce3afdd3209c08b596903a9bef (patch) | |
| tree | 38a22f7b891c01c167246dd93536fe9f0a28b7b6 | |
| parent | cdae72074d9efae7a62c3853cda684fe43f3afa0 (diff) | |
[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: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| -rw-r--r-- | drivers/block/noop-iosched.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/block/noop-iosched.c b/drivers/block/noop-iosched.c index 43f857842d87..888c477e02b3 100644 --- a/drivers/block/noop-iosched.c +++ b/drivers/block/noop-iosched.c @@ -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, int where) { - struct list_head *insert = q->queue_head.prev; - if (where == ELEVATOR_INSERT_FRONT) - insert = &q->queue_head; - - list_add_tail(&rq->queuelist, &q->queue_head); + list_add(&rq->queuelist, &q->queue_head); + else + list_add_tail(&rq->queuelist, &q->queue_head); /* * new merges must not precede this barrier |
