Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359497
b: refs/heads/master
c: 93e6d5d
h: refs/heads/master
i:
  359495: d0312b5
v: v3
  • Loading branch information
Tejun Heo committed Jan 9, 2013
1 parent 2cabf41 commit 7858ef6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 86cde6b62313dd221c2e5935db02de7234cb4164
refs/heads/master: 93e6d5d8f5c909479623c6ab4427f038c6c3f63f
15 changes: 7 additions & 8 deletions trunk/block/blk-cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}

/**
Expand Down

0 comments on commit 7858ef6

Please sign in to comment.