aboutsummaryrefslogtreecommitdiffstats
path: root/block/deadline-iosched.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/deadline-iosched.c')
-rw-r--r--block/deadline-iosched.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/block/deadline-iosched.c b/block/deadline-iosched.c
index 7bf12d793fcd..599b12e5380f 100644
--- a/block/deadline-iosched.c
+++ b/block/deadline-iosched.c
@@ -337,13 +337,13 @@ static void deadline_exit_queue(struct elevator_queue *e)
337/* 337/*
338 * initialize elevator private data (deadline_data). 338 * initialize elevator private data (deadline_data).
339 */ 339 */
340static void *deadline_init_queue(struct request_queue *q) 340static int deadline_init_queue(struct request_queue *q)
341{ 341{
342 struct deadline_data *dd; 342 struct deadline_data *dd;
343 343
344 dd = kmalloc_node(sizeof(*dd), GFP_KERNEL | __GFP_ZERO, q->node); 344 dd = kmalloc_node(sizeof(*dd), GFP_KERNEL | __GFP_ZERO, q->node);
345 if (!dd) 345 if (!dd)
346 return NULL; 346 return -ENOMEM;
347 347
348 INIT_LIST_HEAD(&dd->fifo_list[READ]); 348 INIT_LIST_HEAD(&dd->fifo_list[READ]);
349 INIT_LIST_HEAD(&dd->fifo_list[WRITE]); 349 INIT_LIST_HEAD(&dd->fifo_list[WRITE]);
@@ -354,7 +354,9 @@ static void *deadline_init_queue(struct request_queue *q)
354 dd->writes_starved = writes_starved; 354 dd->writes_starved = writes_starved;
355 dd->front_merges = 1; 355 dd->front_merges = 1;
356 dd->fifo_batch = fifo_batch; 356 dd->fifo_batch = fifo_batch;
357 return dd; 357
358 q->elevator->elevator_data = dd;
359 return 0;
358} 360}
359 361
360/* 362/*