diff options
Diffstat (limited to 'drivers/block/noop-iosched.c')
-rw-r--r-- | drivers/block/noop-iosched.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/block/noop-iosched.c b/drivers/block/noop-iosched.c index b1730b62c37e..bc2252b6f2e5 100644 --- a/drivers/block/noop-iosched.c +++ b/drivers/block/noop-iosched.c | |||
@@ -28,13 +28,9 @@ static void elevator_noop_merge_requests(request_queue_t *q, struct request *req | |||
28 | list_del_init(&next->queuelist); | 28 | list_del_init(&next->queuelist); |
29 | } | 29 | } |
30 | 30 | ||
31 | static void elevator_noop_add_request(request_queue_t *q, struct request *rq, | 31 | static void elevator_noop_add_request(request_queue_t *q, struct request *rq) |
32 | int where) | ||
33 | { | 32 | { |
34 | if (where == ELEVATOR_INSERT_FRONT) | 33 | elv_dispatch_add_tail(q, rq); |
35 | list_add(&rq->queuelist, &q->queue_head); | ||
36 | else | ||
37 | list_add_tail(&rq->queuelist, &q->queue_head); | ||
38 | 34 | ||
39 | /* | 35 | /* |
40 | * new merges must not precede this barrier | 36 | * new merges must not precede this barrier |
@@ -45,19 +41,16 @@ static void elevator_noop_add_request(request_queue_t *q, struct request *rq, | |||
45 | q->last_merge = rq; | 41 | q->last_merge = rq; |
46 | } | 42 | } |
47 | 43 | ||
48 | static struct request *elevator_noop_next_request(request_queue_t *q) | 44 | static int elevator_noop_dispatch(request_queue_t *q, int force) |
49 | { | 45 | { |
50 | if (!list_empty(&q->queue_head)) | 46 | return 0; |
51 | return list_entry_rq(q->queue_head.next); | ||
52 | |||
53 | return NULL; | ||
54 | } | 47 | } |
55 | 48 | ||
56 | static struct elevator_type elevator_noop = { | 49 | static struct elevator_type elevator_noop = { |
57 | .ops = { | 50 | .ops = { |
58 | .elevator_merge_fn = elevator_noop_merge, | 51 | .elevator_merge_fn = elevator_noop_merge, |
59 | .elevator_merge_req_fn = elevator_noop_merge_requests, | 52 | .elevator_merge_req_fn = elevator_noop_merge_requests, |
60 | .elevator_next_req_fn = elevator_noop_next_request, | 53 | .elevator_dispatch_fn = elevator_noop_dispatch, |
61 | .elevator_add_req_fn = elevator_noop_add_request, | 54 | .elevator_add_req_fn = elevator_noop_add_request, |
62 | }, | 55 | }, |
63 | .elevator_name = "noop", | 56 | .elevator_name = "noop", |