diff options
-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 | ||