X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=block%2Fnoop-iosched.c;h=5d1bf70e33d5a04a5fc994c8a8cb0c9ecdbf0900;hb=22b361d1df7bc25b558e52f22e779286a3d323e4;hp=413a0b1d788c745df932745a65adb36ec119afaa;hpb=e98092bedcfff1908ad7a32acc46f13e4d8b2f43;p=cascardo%2Flinux.git diff --git a/block/noop-iosched.c b/block/noop-iosched.c index 413a0b1d788c..5d1bf70e33d5 100644 --- a/block/noop-iosched.c +++ b/block/noop-iosched.c @@ -59,15 +59,17 @@ noop_latter_request(struct request_queue *q, struct request *rq) return list_entry(rq->queuelist.next, struct request, queuelist); } -static void *noop_init_queue(struct request_queue *q) +static int noop_init_queue(struct request_queue *q) { struct noop_data *nd; nd = kmalloc_node(sizeof(*nd), GFP_KERNEL, q->node); if (!nd) - return NULL; + return -ENOMEM; + INIT_LIST_HEAD(&nd->queue); - return nd; + q->elevator->elevator_data = nd; + return 0; } static void noop_exit_queue(struct elevator_queue *e)