diff options
| author | Tejun Heo <tj@kernel.org> | 2012-06-04 23:40:51 -0400 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2012-06-25 05:53:45 -0400 |
| commit | 13589864be74736ca4e6def7376742eb1d2099bf (patch) | |
| tree | ee115325cb8a41695a79cea7be7d11c2486bbd3f /block | |
| parent | 6d9359280753d2955f86d6411047516a9431eb51 (diff) | |
blkcg: __blkg_lookup_create() doesn't need radix preload
There's no point in calling radix_tree_preload() if preloading doesn't
use more permissible GFP mask. Drop preloading from
__blkg_lookup_create().
While at it, drop sparse locking annotation which no longer applies.
v2: Vivek pointed out the odd preload usage. Instead of updating,
just drop it.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
| -rw-r--r-- | block/blk-cgroup.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index e7dee617358e..c3882bbbf0fc 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
| @@ -177,7 +177,6 @@ EXPORT_SYMBOL_GPL(blkg_lookup); | |||
| 177 | 177 | ||
| 178 | static struct blkcg_gq *__blkg_lookup_create(struct blkcg *blkcg, | 178 | static struct blkcg_gq *__blkg_lookup_create(struct blkcg *blkcg, |
| 179 | struct request_queue *q) | 179 | struct request_queue *q) |
| 180 | __releases(q->queue_lock) __acquires(q->queue_lock) | ||
| 181 | { | 180 | { |
| 182 | struct blkcg_gq *blkg; | 181 | struct blkcg_gq *blkg; |
| 183 | int ret; | 182 | int ret; |
| @@ -203,10 +202,6 @@ static struct blkcg_gq *__blkg_lookup_create(struct blkcg *blkcg, | |||
| 203 | goto err_put; | 202 | goto err_put; |
| 204 | 203 | ||
| 205 | /* insert */ | 204 | /* insert */ |
| 206 | ret = radix_tree_preload(GFP_ATOMIC); | ||
| 207 | if (ret) | ||
| 208 | goto err_free; | ||
| 209 | |||
| 210 | spin_lock(&blkcg->lock); | 205 | spin_lock(&blkcg->lock); |
| 211 | ret = radix_tree_insert(&blkcg->blkg_tree, q->id, blkg); | 206 | ret = radix_tree_insert(&blkcg->blkg_tree, q->id, blkg); |
| 212 | if (likely(!ret)) { | 207 | if (likely(!ret)) { |
| @@ -215,14 +210,11 @@ static struct blkcg_gq *__blkg_lookup_create(struct blkcg *blkcg, | |||
| 215 | } | 210 | } |
| 216 | spin_unlock(&blkcg->lock); | 211 | spin_unlock(&blkcg->lock); |
| 217 | 212 | ||
| 218 | radix_tree_preload_end(); | ||
| 219 | |||
| 220 | if (!ret) | 213 | if (!ret) |
| 221 | return blkg; | 214 | return blkg; |
| 222 | err_free: | ||
| 223 | blkg_free(blkg); | ||
| 224 | err_put: | 215 | err_put: |
| 225 | css_put(&blkcg->css); | 216 | css_put(&blkcg->css); |
| 217 | blkg_free(blkg); | ||
| 226 | return ERR_PTR(ret); | 218 | return ERR_PTR(ret); |
| 227 | } | 219 | } |
| 228 | 220 | ||
