diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-22 18:00:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-22 18:00:11 -0400 |
commit | 68cf8d0c720cdb76dc912c983d8dae9de6d6e5cf (patch) | |
tree | 41779dfce5cae3dc495f27f76ed8e66dd046ac4c /block/blk-cgroup.c | |
parent | 0fbf2cc983ca15208545010863c6536d36a25f3a (diff) | |
parent | f3cff25f05f2ac29b2ee355e611b0657482f6f1d (diff) |
Merge branch 'for-3.12/core' of git://git.kernel.dk/linux-block
Pull block IO fixes from Jens Axboe:
"After merge window, no new stuff this time only a collection of neatly
confined and simple fixes"
* 'for-3.12/core' of git://git.kernel.dk/linux-block:
cfq: explicitly use 64bit divide operation for 64bit arguments
block: Add nr_bios to block_rq_remap tracepoint
If the queue is dying then we only call the rq->end_io callout. This leaves bios setup on the request, because the caller assumes when the blk_execute_rq_nowait/blk_execute_rq call has completed that the rq->bios have been cleaned up.
bio-integrity: Fix use of bs->bio_integrity_pool after free
blkcg: relocate root_blkg setting and clearing
block: Convert kmalloc_node(...GFP_ZERO...) to kzalloc_node(...)
block: trace all devices plug operation
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r-- | block/blk-cgroup.c | 25 |
1 files changed, 15 insertions, 10 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++; |