summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-08-19 09:58:25 +0200
committerThomas Gleixner <tglx@linutronix.de>2009-08-19 09:58:25 +0200
commit32a533f259ff439352cc6a87b7bc4cec80d401f6 (patch)
treead4e5ddd4e6b667b17f5842b93b1a92d872bc8ae /include
parente5d14981deee34626f5d024f0a20980e6a2714c1 (diff)
parente3cf1fe8ff341a026b2128bb5c06dfbfd218df11 (diff)
downloadlwn-32a533f259ff439352cc6a87b7bc4cec80d401f6.tar.gz
lwn-32a533f259ff439352cc6a87b7bc4cec80d401f6.zip
Merge branch 'rt/mm' into rt/base
Diffstat (limited to 'include')
-rw-r--r--include/linux/page_cgroup.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h
index 13f126c89ae8..8c933dc9d649 100644
--- a/include/linux/page_cgroup.h
+++ b/include/linux/page_cgroup.h
@@ -12,6 +12,7 @@
*/
struct page_cgroup {
unsigned long flags;
+ spinlock_t lock;
struct mem_cgroup *mem_cgroup;
struct page *page;
struct list_head lru; /* per cgroup LRU list */
@@ -70,17 +71,17 @@ static inline enum zone_type page_cgroup_zid(struct page_cgroup *pc)
static inline void lock_page_cgroup(struct page_cgroup *pc)
{
- bit_spin_lock(PCG_LOCK, &pc->flags);
+ spin_lock(&pc->lock);
}
static inline int trylock_page_cgroup(struct page_cgroup *pc)
{
- return bit_spin_trylock(PCG_LOCK, &pc->flags);
+ return spin_trylock(&pc->lock);
}
static inline void unlock_page_cgroup(struct page_cgroup *pc)
{
- bit_spin_unlock(PCG_LOCK, &pc->flags);
+ spin_unlock(&pc->lock);
}
#else /* CONFIG_CGROUP_MEM_RES_CTLR */