aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mm/slub.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/mm/slub.c b/mm/slub.c
index ce96d485a88..3ca164f3396 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -99,42 +99,42 @@
* the fast path and disables lockless freelists.
*/
+#define FROZEN (1 << PG_active)
+
+#ifdef CONFIG_SLUB_DEBUG
+#define SLABDEBUG (1 << PG_error)
+#else
+#define SLABDEBUG 0
+#endif
+
static inline int SlabFrozen(struct page *page)
{
- return PageActive(page);
+ return page->flags & FROZEN;
}
static inline void SetSlabFrozen(struct page *page)
{
- SetPageActive(page);
+ page->flags |= FROZEN;
}
static inline void ClearSlabFrozen(struct page *page)
{
- ClearPageActive(page);
+ page->flags &= ~FROZEN;
}
static inline int SlabDebug(struct page *page)
{
-#ifdef CONFIG_SLUB_DEBUG
- return PageError(page);
-#else
- return 0;
-#endif
+ return page->flags & SLABDEBUG;
}
static inline void SetSlabDebug(struct page *page)
{
-#ifdef CONFIG_SLUB_DEBUG
- SetPageError(page);
-#endif
+ page->flags |= SLABDEBUG;
}
static inline void ClearSlabDebug(struct page *page)
{
-#ifdef CONFIG_SLUB_DEBUG
- ClearPageError(page);
-#endif
+ page->flags &= ~SLABDEBUG;
}
/*