summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2005-01-13 18:26:02 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-13 18:26:02 -0800
commit812ab7f31be1ebce3afdd3209c08b596903a9bef (patch)
tree38a22f7b891c01c167246dd93536fe9f0a28b7b6
parentcdae72074d9efae7a62c3853cda684fe43f3afa0 (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.c8
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