|
@@ -59,8 +59,6 @@ static inline void ClearPageCgroup##uname(struct page_cgroup *pc) \
|
|
|
static inline int TestClearPageCgroup##uname(struct page_cgroup *pc) \
|
|
|
{ return test_and_clear_bit(PCG_##lname, &pc->flags); }
|
|
|
|
|
|
-TESTPCGFLAG(Locked, LOCK)
|
|
|
-
|
|
|
/* Cache flag is set only once (at allocation) */
|
|
|
TESTPCGFLAG(Cache, CACHE)
|
|
|
CLEARPCGFLAG(Cache, CACHE)
|
|
@@ -104,6 +102,11 @@ static inline void unlock_page_cgroup(struct page_cgroup *pc)
|
|
|
bit_spin_unlock(PCG_LOCK, &pc->flags);
|
|
|
}
|
|
|
|
|
|
+static inline int page_is_cgroup_locked(struct page_cgroup *pc)
|
|
|
+{
|
|
|
+ return bit_spin_is_locked(PCG_LOCK, &pc->flags);
|
|
|
+}
|
|
|
+
|
|
|
#else /* CONFIG_CGROUP_MEM_RES_CTLR */
|
|
|
struct page_cgroup;
|
|
|
|