diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index d605857c4bf3795de234adfebc2f67c3cae33b67..a0fc64167129d0e852508656fa0530bfdaec641f 100644 (file)
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
/* 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 */
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);
}
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);
}
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);
}