Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339336
b: refs/heads/master
c: 38b53ab
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo committed Nov 19, 2012
1 parent 09f0aa1 commit 80a1f08
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 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: febfcef60d4f9457785b45aab548bc7ee5ea158f
refs/heads/master: 38b53abaa3e0c7e750ef73eee919cf42eee6b134
8 changes: 4 additions & 4 deletions trunk/include/linux/cgroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ struct cgroup_subsys_state {

/* bits in struct cgroup_subsys_state flags field */
enum {
CSS_ROOT, /* This CSS is the root of the subsystem */
CSS_ROOT = (1 << 0), /* this CSS is the root of the subsystem */
};

/* Caller must verify that the css is not for root cgroup */
Expand All @@ -100,7 +100,7 @@ static inline void __css_get(struct cgroup_subsys_state *css, int count)
static inline void css_get(struct cgroup_subsys_state *css)
{
/* We don't need to reference count the root state */
if (!test_bit(CSS_ROOT, &css->flags))
if (!(css->flags & CSS_ROOT))
__css_get(css, 1);
}

Expand All @@ -113,7 +113,7 @@ static inline void css_get(struct cgroup_subsys_state *css)
extern bool __css_tryget(struct cgroup_subsys_state *css);
static inline bool css_tryget(struct cgroup_subsys_state *css)
{
if (test_bit(CSS_ROOT, &css->flags))
if (css->flags & CSS_ROOT)
return true;
return __css_tryget(css);
}
Expand All @@ -126,7 +126,7 @@ static inline bool css_tryget(struct cgroup_subsys_state *css)
extern void __css_put(struct cgroup_subsys_state *css);
static inline void css_put(struct cgroup_subsys_state *css)
{
if (!test_bit(CSS_ROOT, &css->flags))
if (!(css->flags & CSS_ROOT))
__css_put(css);
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -4020,7 +4020,7 @@ static void init_cgroup_css(struct cgroup_subsys_state *css,
css->flags = 0;
css->id = NULL;
if (cgrp == dummytop)
set_bit(CSS_ROOT, &css->flags);
css->flags |= CSS_ROOT;
BUG_ON(cgrp->subsys[ss->subsys_id]);
cgrp->subsys[ss->subsys_id] = css;

Expand Down

0 comments on commit 80a1f08

Please sign in to comment.