Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339364
b: refs/heads/master
c: f33fddc
h: refs/heads/master
v: v3
  • Loading branch information
Gao feng authored and Tejun Heo committed Dec 6, 2012
1 parent f98f428 commit ad86879
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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: 7083d0378a1746f2b45729cae494c6b92e75d73f
refs/heads/master: f33fddc2b9573d8359f1007d4bbe5cd587a0c093
12 changes: 6 additions & 6 deletions trunk/kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -2724,12 +2724,6 @@ static int cgroup_add_file(struct cgroup *cgrp, struct cgroup_subsys *subsys,

simple_xattrs_init(&cft->xattrs);

/* does @cft->flags tell us to skip creation on @cgrp? */
if ((cft->flags & CFTYPE_NOT_ON_ROOT) && !cgrp->parent)
return 0;
if ((cft->flags & CFTYPE_ONLY_ON_ROOT) && cgrp->parent)
return 0;

if (subsys && !test_bit(ROOT_NOPREFIX, &cgrp->root->flags)) {
strcpy(name, subsys->name);
strcat(name, ".");
Expand Down Expand Up @@ -2770,6 +2764,12 @@ static int cgroup_addrm_files(struct cgroup *cgrp, struct cgroup_subsys *subsys,
int err, ret = 0;

for (cft = cfts; cft->name[0] != '\0'; cft++) {
/* does cft->flags tell us to skip this file on @cgrp? */
if ((cft->flags & CFTYPE_NOT_ON_ROOT) && !cgrp->parent)
continue;
if ((cft->flags & CFTYPE_ONLY_ON_ROOT) && cgrp->parent)
continue;

if (is_add)
err = cgroup_add_file(cgrp, subsys, cft);
else
Expand Down

0 comments on commit ad86879

Please sign in to comment.