diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-23 16:24:10 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-23 16:24:10 -0400 |
commit | dc4fea795bf7e3f80dbfa3a40b8ab89427e9aed5 (patch) | |
tree | 1926c96f145965c393a2c8ab523c327dd1a241cf /block | |
parent | c8f2efc8f636506e0f0c2ba4035382076875f0c1 (diff) | |
parent | 9d23108df359e572a0dca0b631bfee9f5e0fa9ea (diff) |
Merge branch 'master' into usb-next
We have USB fixes now in Linus's tree that we need to properly sort out
with reverts and the like in the usb-next branch, so merge them together
and do it by hand.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-cgroup.c | 25 | ||||
-rw-r--r-- | block/blk-core.c | 6 | ||||
-rw-r--r-- | block/blk-exec.c | 4 | ||||
-rw-r--r-- | block/cfq-iosched.c | 4 | ||||
-rw-r--r-- | block/deadline-iosched.c | 2 | ||||
-rw-r--r-- | block/elevator.c | 2 | ||||
-rw-r--r-- | block/genhd.c | 3 |
7 files changed, 24 insertions, 22 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index e90c7c164c83..4e491d9b5292 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
@@ -235,8 +235,13 @@ static struct blkcg_gq *blkg_create(struct blkcg *blkcg, | |||
235 | blkg->online = true; | 235 | blkg->online = true; |
236 | spin_unlock(&blkcg->lock); | 236 | spin_unlock(&blkcg->lock); |
237 | 237 | ||
238 | if (!ret) | 238 | if (!ret) { |
239 | if (blkcg == &blkcg_root) { | ||
240 | q->root_blkg = blkg; | ||
241 | q->root_rl.blkg = blkg; | ||
242 | } | ||
239 | return blkg; | 243 | return blkg; |
244 | } | ||
240 | 245 | ||
241 | /* @blkg failed fully initialized, use the usual release path */ | 246 | /* @blkg failed fully initialized, use the usual release path */ |
242 | blkg_put(blkg); | 247 | blkg_put(blkg); |
@@ -335,6 +340,15 @@ static void blkg_destroy(struct blkcg_gq *blkg) | |||
335 | rcu_assign_pointer(blkcg->blkg_hint, NULL); | 340 | rcu_assign_pointer(blkcg->blkg_hint, NULL); |
336 | 341 | ||
337 | /* | 342 | /* |
343 | * If root blkg is destroyed. Just clear the pointer since root_rl | ||
344 | * does not take reference on root blkg. | ||
345 | */ | ||
346 | if (blkcg == &blkcg_root) { | ||
347 | blkg->q->root_blkg = NULL; | ||
348 | blkg->q->root_rl.blkg = NULL; | ||
349 | } | ||
350 | |||
351 | /* | ||
338 | * Put the reference taken at the time of creation so that when all | 352 | * Put the reference taken at the time of creation so that when all |
339 | * queues are gone, group can be destroyed. | 353 | * queues are gone, group can be destroyed. |
340 | */ | 354 | */ |
@@ -360,13 +374,6 @@ static void blkg_destroy_all(struct request_queue *q) | |||
360 | blkg_destroy(blkg); | 374 | blkg_destroy(blkg); |
361 | spin_unlock(&blkcg->lock); | 375 | spin_unlock(&blkcg->lock); |
362 | } | 376 | } |
363 | |||
364 | /* | ||
365 | * root blkg is destroyed. Just clear the pointer since | ||
366 | * root_rl does not take reference on root blkg. | ||
367 | */ | ||
368 | q->root_blkg = NULL; | ||
369 | q->root_rl.blkg = NULL; | ||
370 | } | 377 | } |
371 | 378 | ||
372 | /* | 379 | /* |
@@ -970,8 +977,6 @@ int blkcg_activate_policy(struct request_queue *q, | |||
970 | ret = PTR_ERR(blkg); | 977 | ret = PTR_ERR(blkg); |
971 | goto out_unlock; | 978 | goto out_unlock; |
972 | } | 979 | } |
973 | q->root_blkg = blkg; | ||
974 | q->root_rl.blkg = blkg; | ||
975 | 980 | ||
976 | list_for_each_entry(blkg, &q->blkg_list, q_node) | 981 | list_for_each_entry(blkg, &q->blkg_list, q_node) |
977 | cnt++; | 982 | cnt++; |
diff --git a/block/blk-core.c b/block/blk-core.c index c04505358342..0a00e4ecf87c 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -1549,11 +1549,9 @@ get_rq: | |||
1549 | if (plug) { | 1549 | if (plug) { |
1550 | /* | 1550 | /* |
1551 | * If this is the first request added after a plug, fire | 1551 | * If this is the first request added after a plug, fire |
1552 | * of a plug trace. If others have been added before, check | 1552 | * of a plug trace. |
1553 | * if we have multiple devices in this plug. If so, make a | ||
1554 | * note to sort the list before dispatch. | ||
1555 | */ | 1553 | */ |
1556 | if (list_empty(&plug->list)) | 1554 | if (!request_count) |
1557 | trace_block_plug(q); | 1555 | trace_block_plug(q); |
1558 | else { | 1556 | else { |
1559 | if (request_count >= BLK_MAX_REQUEST_COUNT) { | 1557 | if (request_count >= BLK_MAX_REQUEST_COUNT) { |
diff --git a/block/blk-exec.c b/block/blk-exec.c index e70621396129..ae4f27d7944e 100644 --- a/block/blk-exec.c +++ b/block/blk-exec.c | |||
@@ -68,9 +68,9 @@ void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk, | |||
68 | spin_lock_irq(q->queue_lock); | 68 | spin_lock_irq(q->queue_lock); |
69 | 69 | ||
70 | if (unlikely(blk_queue_dying(q))) { | 70 | if (unlikely(blk_queue_dying(q))) { |
71 | rq->cmd_flags |= REQ_QUIET; | ||
71 | rq->errors = -ENXIO; | 72 | rq->errors = -ENXIO; |
72 | if (rq->end_io) | 73 | __blk_end_request_all(rq, rq->errors); |
73 | rq->end_io(rq, rq->errors); | ||
74 | spin_unlock_irq(q->queue_lock); | 74 | spin_unlock_irq(q->queue_lock); |
75 | return; | 75 | return; |
76 | } | 76 | } |
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index dabb9d02cf9a..434944cbd761 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -1803,7 +1803,7 @@ static u64 cfqg_prfill_avg_queue_size(struct seq_file *sf, | |||
1803 | 1803 | ||
1804 | if (samples) { | 1804 | if (samples) { |
1805 | v = blkg_stat_read(&cfqg->stats.avg_queue_size_sum); | 1805 | v = blkg_stat_read(&cfqg->stats.avg_queue_size_sum); |
1806 | do_div(v, samples); | 1806 | v = div64_u64(v, samples); |
1807 | } | 1807 | } |
1808 | __blkg_prfill_u64(sf, pd, v); | 1808 | __blkg_prfill_u64(sf, pd, v); |
1809 | return 0; | 1809 | return 0; |
@@ -4358,7 +4358,7 @@ static int cfq_init_queue(struct request_queue *q, struct elevator_type *e) | |||
4358 | if (!eq) | 4358 | if (!eq) |
4359 | return -ENOMEM; | 4359 | return -ENOMEM; |
4360 | 4360 | ||
4361 | cfqd = kmalloc_node(sizeof(*cfqd), GFP_KERNEL | __GFP_ZERO, q->node); | 4361 | cfqd = kzalloc_node(sizeof(*cfqd), GFP_KERNEL, q->node); |
4362 | if (!cfqd) { | 4362 | if (!cfqd) { |
4363 | kobject_put(&eq->kobj); | 4363 | kobject_put(&eq->kobj); |
4364 | return -ENOMEM; | 4364 | return -ENOMEM; |
diff --git a/block/deadline-iosched.c b/block/deadline-iosched.c index 20614a332362..9ef66406c625 100644 --- a/block/deadline-iosched.c +++ b/block/deadline-iosched.c | |||
@@ -346,7 +346,7 @@ static int deadline_init_queue(struct request_queue *q, struct elevator_type *e) | |||
346 | if (!eq) | 346 | if (!eq) |
347 | return -ENOMEM; | 347 | return -ENOMEM; |
348 | 348 | ||
349 | dd = kmalloc_node(sizeof(*dd), GFP_KERNEL | __GFP_ZERO, q->node); | 349 | dd = kzalloc_node(sizeof(*dd), GFP_KERNEL, q->node); |
350 | if (!dd) { | 350 | if (!dd) { |
351 | kobject_put(&eq->kobj); | 351 | kobject_put(&eq->kobj); |
352 | return -ENOMEM; | 352 | return -ENOMEM; |
diff --git a/block/elevator.c b/block/elevator.c index 668394d18588..2bcbd8cc14d4 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
@@ -155,7 +155,7 @@ struct elevator_queue *elevator_alloc(struct request_queue *q, | |||
155 | { | 155 | { |
156 | struct elevator_queue *eq; | 156 | struct elevator_queue *eq; |
157 | 157 | ||
158 | eq = kmalloc_node(sizeof(*eq), GFP_KERNEL | __GFP_ZERO, q->node); | 158 | eq = kzalloc_node(sizeof(*eq), GFP_KERNEL, q->node); |
159 | if (unlikely(!eq)) | 159 | if (unlikely(!eq)) |
160 | goto err; | 160 | goto err; |
161 | 161 | ||
diff --git a/block/genhd.c b/block/genhd.c index dadf42b454a3..791f41943132 100644 --- a/block/genhd.c +++ b/block/genhd.c | |||
@@ -1252,8 +1252,7 @@ struct gendisk *alloc_disk_node(int minors, int node_id) | |||
1252 | { | 1252 | { |
1253 | struct gendisk *disk; | 1253 | struct gendisk *disk; |
1254 | 1254 | ||
1255 | disk = kmalloc_node(sizeof(struct gendisk), | 1255 | disk = kzalloc_node(sizeof(struct gendisk), GFP_KERNEL, node_id); |
1256 | GFP_KERNEL | __GFP_ZERO, node_id); | ||
1257 | if (disk) { | 1256 | if (disk) { |
1258 | if (!init_part_stats(&disk->part0)) { | 1257 | if (!init_part_stats(&disk->part0)) { |
1259 | kfree(disk); | 1258 | kfree(disk); |