Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83752
b: refs/heads/master
c: e18f631
h: refs/heads/master
v: v3
  • Loading branch information
Paul Jackson authored and Linus Torvalds committed Feb 7, 2008
1 parent efb942e commit 5899a5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 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: 3cdeed2986b09fcc77b4812ca10dbc057e4e5f8c
refs/heads/master: e18f6318e5dab189efd4cb0bbfcbd923cc373e3c
15 changes: 5 additions & 10 deletions trunk/kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1181,9 +1181,8 @@ static int attach_task(struct cgroup *cgrp, struct task_struct *tsk)
for_each_subsys(root, ss) {
if (ss->can_attach) {
retval = ss->can_attach(ss, cgrp, tsk);
if (retval) {
if (retval)
return retval;
}
}
}

Expand All @@ -1192,9 +1191,8 @@ static int attach_task(struct cgroup *cgrp, struct task_struct *tsk)
* based on its final set of cgroups
*/
newcg = find_css_set(cg, cgrp);
if (!newcg) {
if (!newcg)
return -ENOMEM;
}

task_lock(tsk);
if (tsk->flags & PF_EXITING) {
Expand All @@ -1214,9 +1212,8 @@ static int attach_task(struct cgroup *cgrp, struct task_struct *tsk)
write_unlock(&css_set_lock);

for_each_subsys(root, ss) {
if (ss->attach) {
if (ss->attach)
ss->attach(ss, cgrp, oldcgrp, tsk);
}
}
set_bit(CGRP_RELEASABLE, &oldcgrp->flags);
synchronize_rcu();
Expand Down Expand Up @@ -1352,9 +1349,8 @@ static ssize_t cgroup_common_file_write(struct cgroup *cgrp,
{
struct cgroupfs_root *root = cgrp->root;
/* Strip trailing newline */
if (nbytes && (buffer[nbytes-1] == '\n')) {
if (nbytes && (buffer[nbytes-1] == '\n'))
buffer[nbytes-1] = 0;
}

/* We never write anything other than '\0'
* into the last char of release_agent_path,
Expand Down Expand Up @@ -2124,9 +2120,8 @@ static inline int cgroup_has_css_refs(struct cgroup *cgrp)
* matter, since it can only happen if the cgroup
* has been deleted and hence no longer needs the
* release agent to be called anyway. */
if (css && atomic_read(&css->refcnt)) {
if (css && atomic_read(&css->refcnt))
return 1;
}
}
return 0;
}
Expand Down

0 comments on commit 5899a5b

Please sign in to comment.