aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/mm/slub.c b/mm/slub.c
index ce96d485a88f..3ca164f33965 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -99,42 +99,42 @@
99 * the fast path and disables lockless freelists. 99 * the fast path and disables lockless freelists.
100 */ 100 */
101 101
102#define FROZEN (1 << PG_active)
103
104#ifdef CONFIG_SLUB_DEBUG
105#define SLABDEBUG (1 << PG_error)
106#else
107#define SLABDEBUG 0
108#endif
109
102static inline int SlabFrozen(struct page *page) 110static inline int SlabFrozen(struct page *page)
103{ 111{
104 return PageActive(page); 112 return page->flags & FROZEN;
105} 113}
106 114
107static inline void SetSlabFrozen(struct page *page) 115static inline void SetSlabFrozen(struct page *page)
108{ 116{
109 SetPageActive(page); 117 page->flags |= FROZEN;
110} 118}
111 119
112static inline void ClearSlabFrozen(struct page *page) 120static inline void ClearSlabFrozen(struct page *page)
113{ 121{
114 ClearPageActive(page); 122 page->flags &= ~FROZEN;
115} 123}
116 124
117static inline int SlabDebug(struct page *page) 125static inline int SlabDebug(struct page *page)
118{ 126{
119#ifdef CONFIG_SLUB_DEBUG 127 return page->flags & SLABDEBUG;
120 return PageError(page);
121#else
122 return 0;
123#endif
124} 128}
125 129
126static inline void SetSlabDebug(struct page *page) 130static inline void SetSlabDebug(struct page *page)
127{ 131{
128#ifdef CONFIG_SLUB_DEBUG 132 page->flags |= SLABDEBUG;
129 SetPageError(page);
130#endif
131} 133}
132 134
133static inline void ClearSlabDebug(struct page *page) 135static inline void ClearSlabDebug(struct page *page)
134{ 136{
135#ifdef CONFIG_SLUB_DEBUG 137 page->flags &= ~SLABDEBUG;
136 ClearPageError(page);
137#endif
138} 138}
139 139
140/* 140/*