diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/page_cgroup.h | 7 |
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 @@ | |||
| 12 | */ | 12 | */ |
| 13 | struct page_cgroup { | 13 | struct page_cgroup { |
| 14 | unsigned long flags; | 14 | unsigned long flags; |
| 15 | spinlock_t lock; | ||
| 15 | struct mem_cgroup *mem_cgroup; | 16 | struct mem_cgroup *mem_cgroup; |
| 16 | struct page *page; | 17 | struct page *page; |
| 17 | struct list_head lru; /* per cgroup LRU list */ | 18 | struct list_head lru; /* per cgroup LRU list */ |
| @@ -70,17 +71,17 @@ static inline enum zone_type page_cgroup_zid(struct page_cgroup *pc) | |||
| 70 | 71 | ||
| 71 | static inline void lock_page_cgroup(struct page_cgroup *pc) | 72 | static inline void lock_page_cgroup(struct page_cgroup *pc) |
| 72 | { | 73 | { |
| 73 | bit_spin_lock(PCG_LOCK, &pc->flags); | 74 | spin_lock(&pc->lock); |
| 74 | } | 75 | } |
| 75 | 76 | ||
| 76 | static inline int trylock_page_cgroup(struct page_cgroup *pc) | 77 | static inline int trylock_page_cgroup(struct page_cgroup *pc) |
| 77 | { | 78 | { |
| 78 | return bit_spin_trylock(PCG_LOCK, &pc->flags); | 79 | return spin_trylock(&pc->lock); |
| 79 | } | 80 | } |
| 80 | 81 | ||
| 81 | static inline void unlock_page_cgroup(struct page_cgroup *pc) | 82 | static inline void unlock_page_cgroup(struct page_cgroup *pc) |
| 82 | { | 83 | { |
| 83 | bit_spin_unlock(PCG_LOCK, &pc->flags); | 84 | spin_unlock(&pc->lock); |
| 84 | } | 85 | } |
| 85 | 86 | ||
| 86 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ | 87 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ |
