diff options
Diffstat (limited to 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -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 | |||
102 | static inline int SlabFrozen(struct page *page) | 110 | static inline int SlabFrozen(struct page *page) |
103 | { | 111 | { |
104 | return PageActive(page); | 112 | return page->flags & FROZEN; |
105 | } | 113 | } |
106 | 114 | ||
107 | static inline void SetSlabFrozen(struct page *page) | 115 | static inline void SetSlabFrozen(struct page *page) |
108 | { | 116 | { |
109 | SetPageActive(page); | 117 | page->flags |= FROZEN; |
110 | } | 118 | } |
111 | 119 | ||
112 | static inline void ClearSlabFrozen(struct page *page) | 120 | static inline void ClearSlabFrozen(struct page *page) |
113 | { | 121 | { |
114 | ClearPageActive(page); | 122 | page->flags &= ~FROZEN; |
115 | } | 123 | } |
116 | 124 | ||
117 | static inline int SlabDebug(struct page *page) | 125 | static 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 | ||
126 | static inline void SetSlabDebug(struct page *page) | 130 | static 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 | ||
133 | static inline void ClearSlabDebug(struct page *page) | 135 | static 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 | /* |