diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-08-19 10:07:49 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-08-19 10:07:49 +0200 |
commit | 94a6b8cf01c940a92f945b5fe83eb2d4cd00aefd (patch) | |
tree | 598e4b7f0b7b64db39b8e53e4aa072a8b8b7f903 | |
parent | 6d97e6acc354bc9b69a33a41d74fa7a601dd8122 (diff) | |
parent | 32a533f259ff439352cc6a87b7bc4cec80d401f6 (diff) | |
download | lwn-94a6b8cf01c940a92f945b5fe83eb2d4cd00aefd.tar.gz lwn-94a6b8cf01c940a92f945b5fe83eb2d4cd00aefd.zip |
Merge branch 'rt/base' into rt/head
-rw-r--r-- | include/linux/page_cgroup.h | 7 | ||||
-rw-r--r-- | mm/page_cgroup.c | 1 |
2 files changed, 5 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 */ diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c index f22b4ebbd8dc..835674efb23b 100644 --- a/mm/page_cgroup.c +++ b/mm/page_cgroup.c @@ -14,6 +14,7 @@ static void __meminit __init_page_cgroup(struct page_cgroup *pc, unsigned long pfn) { pc->flags = 0; + spin_lock_init(&pc->lock); pc->mem_cgroup = NULL; pc->page = pfn_to_page(pfn); INIT_LIST_HEAD(&pc->lru); |