aboutsummaryrefslogtreecommitdiffstats
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r--block/cfq-iosched.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 388fe01de18e..72680a6715fc 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -3656,7 +3656,7 @@ static void cfq_exit_queue(struct elevator_queue *e)
3656 kfree(cfqd); 3656 kfree(cfqd);
3657} 3657}
3658 3658
3659static void *cfq_init_queue(struct request_queue *q) 3659static int cfq_init_queue(struct request_queue *q)
3660{ 3660{
3661 struct cfq_data *cfqd; 3661 struct cfq_data *cfqd;
3662 int i, j; 3662 int i, j;
@@ -3665,7 +3665,7 @@ static void *cfq_init_queue(struct request_queue *q)
3665 3665
3666 cfqd = kmalloc_node(sizeof(*cfqd), GFP_KERNEL | __GFP_ZERO, q->node); 3666 cfqd = kmalloc_node(sizeof(*cfqd), GFP_KERNEL | __GFP_ZERO, q->node);
3667 if (!cfqd) 3667 if (!cfqd)
3668 return NULL; 3668 return -ENOMEM;
3669 3669
3670 /* Init root service tree */ 3670 /* Init root service tree */
3671 cfqd->grp_service_tree = CFQ_RB_ROOT; 3671 cfqd->grp_service_tree = CFQ_RB_ROOT;
@@ -3692,7 +3692,7 @@ static void *cfq_init_queue(struct request_queue *q)
3692 if (blkio_alloc_blkg_stats(&cfqg->blkg)) { 3692 if (blkio_alloc_blkg_stats(&cfqg->blkg)) {
3693 kfree(cfqg); 3693 kfree(cfqg);
3694 kfree(cfqd); 3694 kfree(cfqd);
3695 return NULL; 3695 return -ENOMEM;
3696 } 3696 }
3697 3697
3698 rcu_read_lock(); 3698 rcu_read_lock();
@@ -3723,6 +3723,7 @@ static void *cfq_init_queue(struct request_queue *q)
3723 cfq_link_cfqq_cfqg(&cfqd->oom_cfqq, &cfqd->root_group); 3723 cfq_link_cfqq_cfqg(&cfqd->oom_cfqq, &cfqd->root_group);
3724 3724
3725 cfqd->queue = q; 3725 cfqd->queue = q;
3726 q->elevator->elevator_data = cfqd;
3726 3727
3727 init_timer(&cfqd->idle_slice_timer); 3728 init_timer(&cfqd->idle_slice_timer);
3728 cfqd->idle_slice_timer.function = cfq_idle_slice_timer; 3729 cfqd->idle_slice_timer.function = cfq_idle_slice_timer;
@@ -3747,7 +3748,7 @@ static void *cfq_init_queue(struct request_queue *q)
3747 * second, in order to have larger depth for async operations. 3748 * second, in order to have larger depth for async operations.
3748 */ 3749 */
3749 cfqd->last_delayed_sync = jiffies - HZ; 3750 cfqd->last_delayed_sync = jiffies - HZ;
3750 return cfqd; 3751 return 0;
3751} 3752}
3752 3753
3753/* 3754/*