From 80a1f088765d1cc78f386d725bc2bfd3725865e2 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Mon, 19 Nov 2012 08:13:36 -0800 Subject: [PATCH] --- yaml --- r: 339336 b: refs/heads/master c: 38b53abaa3e0c7e750ef73eee919cf42eee6b134 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/cgroup.h | 8 ++++---- trunk/kernel/cgroup.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index f49fe0b92ce1..5256af9168b3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: febfcef60d4f9457785b45aab548bc7ee5ea158f +refs/heads/master: 38b53abaa3e0c7e750ef73eee919cf42eee6b134 diff --git a/trunk/include/linux/cgroup.h b/trunk/include/linux/cgroup.h index d605857c4bf3..a0fc64167129 100644 --- a/trunk/include/linux/cgroup.h +++ b/trunk/include/linux/cgroup.h @@ -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 */ @@ -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); } @@ -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); } @@ -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); } diff --git a/trunk/kernel/cgroup.c b/trunk/kernel/cgroup.c index affc76d7f739..82ad8785fafe 100644 --- a/trunk/kernel/cgroup.c +++ b/trunk/kernel/cgroup.c @@ -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;