summaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-01-09 08:05:10 -0800
committerTejun Heo <tj@kernel.org>2013-01-09 08:05:10 -0800
commit93e6d5d8f5c909479623c6ab4427f038c6c3f63f (patch)
treea67f60f0b7582f0e85437455c40e071fb27607dd /block/blk-cgroup.c
parent86cde6b62313dd221c2e5935db02de7234cb4164 (diff)
downloadop-kernel-dev-93e6d5d8f5c909479623c6ab4427f038c6c3f63f.zip
op-kernel-dev-93e6d5d8f5c909479623c6ab4427f038c6c3f63f.tar.gz
blkcg: cosmetic updates to blkg_create()
* Rename out_* labels to err_*. * Do ERR_PTR() conversion once in the error return path. This patch is cosmetic and to prepare for the hierarchy support. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Vivek Goyal <vgoyal@redhat.com>
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r--block/blk-cgroup.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 2012754..18ae480 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -187,16 +187,16 @@ static struct blkcg_gq *blkg_create(struct blkcg *blkcg,
/* blkg holds a reference to blkcg */
if (!css_tryget(&blkcg->css)) {
- blkg = ERR_PTR(-EINVAL);
- goto out_free;
+ ret = -EINVAL;
+ goto err_free_blkg;
}
/* allocate */
if (!new_blkg) {
new_blkg = blkg_alloc(blkcg, q, GFP_ATOMIC);
if (unlikely(!new_blkg)) {
- blkg = ERR_PTR(-ENOMEM);
- goto out_put;
+ ret = -ENOMEM;
+ goto err_put_css;
}
}
blkg = new_blkg;
@@ -213,12 +213,11 @@ static struct blkcg_gq *blkg_create(struct blkcg *blkcg,
if (!ret)
return blkg;
- blkg = ERR_PTR(ret);
-out_put:
+err_put_css:
css_put(&blkcg->css);
-out_free:
+err_free_blkg:
blkg_free(new_blkg);
- return blkg;
+ return ERR_PTR(ret);
}
/**
OpenPOWER on IntegriCloud