enum {
/* flags for mem_cgroup */
- PCG_USED, /* This page is charged to a memcg */
- PCG_MEM, /* This page holds a memory charge */
- PCG_MEMSW, /* This page holds a memory+swap charge */
+ PCG_USED = 0x01, /* This page is charged to a memcg */
+ PCG_MEM = 0x02, /* This page holds a memory charge */
+ PCG_MEMSW = 0x04, /* This page holds a memory+swap charge */
__NR_PCG_FLAGS,
};
static inline int PageCgroupUsed(struct page_cgroup *pc)
{
- return test_bit(PCG_USED, &pc->flags);
+ return !!(pc->flags & PCG_USED);
}
#else /* CONFIG_MEMCG */