aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-throttle.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-02-09 14:45:21 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-02-09 14:45:21 -0500
commitaceb91cd351bc3a19a783c901fe8a8070d5f6fa9 (patch)
treea0863e940a77ae10d3c8b391488e29a8245b31be /block/blk-throttle.c
parentae8eed2d0906bf0d8eb0c2a4651676a41d361297 (diff)
parentb8cf0e0e552ca48e9a00f518aeb4f5e03984022b (diff)
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: cdrom: support devices that have check_events but not media_changed cfq-iosched: Don't wait if queue already has requests. blkio-throttle: Avoid calling blkiocg_lookup_group() for root group cfq: rename a function to give it more appropriate name cciss: make cciss_revalidate not loop through CISS_MAX_LUNS volumes unnecessarily. drivers/block/aoe/Makefile: replace the use of <module>-objs with <module>-y loop: queue_lock NULL pointer derefence in blk_throtl_exit drivers/block/Makefile: replace the use of <module>-objs with <module>-y blktrace: Don't output messages if NOTIFY isn't set.
Diffstat (limited to 'block/blk-throttle.c')
-rw-r--r--block/blk-throttle.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 381b09bb562b..a89043a3caa4 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -168,7 +168,15 @@ static struct throtl_grp * throtl_find_alloc_tg(struct throtl_data *td,
168 * tree of blkg (instead of traversing through hash list all 168 * tree of blkg (instead of traversing through hash list all
169 * the time. 169 * the time.
170 */ 170 */
171 tg = tg_of_blkg(blkiocg_lookup_group(blkcg, key)); 171
172 /*
173 * This is the common case when there are no blkio cgroups.
174 * Avoid lookup in this case
175 */
176 if (blkcg == &blkio_root_cgroup)
177 tg = &td->root_tg;
178 else
179 tg = tg_of_blkg(blkiocg_lookup_group(blkcg, key));
172 180
173 /* Fill in device details for root group */ 181 /* Fill in device details for root group */
174 if (tg && !tg->blkg.dev && bdi->dev && dev_name(bdi->dev)) { 182 if (tg && !tg->blkg.dev && bdi->dev && dev_name(bdi->dev)) {