Commit 64f9b683 authored by Jens Axboe's avatar Jens Axboe

Merge branch 'for-linus' into for-4.1/core

parents c202baf0 9a30b096
...@@ -1938,7 +1938,7 @@ struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *set) ...@@ -1938,7 +1938,7 @@ struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *set)
*/ */
if (percpu_ref_init(&q->mq_usage_counter, blk_mq_usage_counter_release, if (percpu_ref_init(&q->mq_usage_counter, blk_mq_usage_counter_release,
PERCPU_REF_INIT_ATOMIC, GFP_KERNEL)) PERCPU_REF_INIT_ATOMIC, GFP_KERNEL))
goto err_map; goto err_mq_usage;
setup_timer(&q->timeout, blk_mq_rq_timer, (unsigned long) q); setup_timer(&q->timeout, blk_mq_rq_timer, (unsigned long) q);
blk_queue_rq_timeout(q, 30000); blk_queue_rq_timeout(q, 30000);
...@@ -1981,7 +1981,7 @@ struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *set) ...@@ -1981,7 +1981,7 @@ struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *set)
blk_mq_init_cpu_queues(q, set->nr_hw_queues); blk_mq_init_cpu_queues(q, set->nr_hw_queues);
if (blk_mq_init_hw_queues(q, set)) if (blk_mq_init_hw_queues(q, set))
goto err_hw; goto err_mq_usage;
mutex_lock(&all_q_mutex); mutex_lock(&all_q_mutex);
list_add_tail(&q->all_q_node, &all_q_list); list_add_tail(&q->all_q_node, &all_q_list);
...@@ -1993,7 +1993,7 @@ struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *set) ...@@ -1993,7 +1993,7 @@ struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *set)
return q; return q;
err_hw: err_mq_usage:
blk_cleanup_queue(q); blk_cleanup_queue(q);
err_hctxs: err_hctxs:
kfree(map); kfree(map);
......
...@@ -803,10 +803,6 @@ static int __init nbd_init(void) ...@@ -803,10 +803,6 @@ static int __init nbd_init(void)
return -EINVAL; return -EINVAL;
} }
nbd_dev = kcalloc(nbds_max, sizeof(*nbd_dev), GFP_KERNEL);
if (!nbd_dev)
return -ENOMEM;
part_shift = 0; part_shift = 0;
if (max_part > 0) { if (max_part > 0) {
part_shift = fls(max_part); part_shift = fls(max_part);
...@@ -828,6 +824,10 @@ static int __init nbd_init(void) ...@@ -828,6 +824,10 @@ static int __init nbd_init(void)
if (nbds_max > 1UL << (MINORBITS - part_shift)) if (nbds_max > 1UL << (MINORBITS - part_shift))
return -EINVAL; return -EINVAL;
nbd_dev = kcalloc(nbds_max, sizeof(*nbd_dev), GFP_KERNEL);
if (!nbd_dev)
return -ENOMEM;
for (i = 0; i < nbds_max; i++) { for (i = 0; i < nbds_max; i++) {
struct gendisk *disk = alloc_disk(1 << part_shift); struct gendisk *disk = alloc_disk(1 << part_shift);
if (!disk) if (!disk)
......
...@@ -922,7 +922,7 @@ static void global_update_bandwidth(unsigned long thresh, ...@@ -922,7 +922,7 @@ static void global_update_bandwidth(unsigned long thresh,
unsigned long now) unsigned long now)
{ {
static DEFINE_SPINLOCK(dirty_lock); static DEFINE_SPINLOCK(dirty_lock);
static unsigned long update_time; static unsigned long update_time = INITIAL_JIFFIES;
/* /*
* check locklessly first to optimize away locking for the most time * check locklessly first to optimize away locking for the most time
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment