aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/page-flags.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/page-flags.h')
-rw-r--r--include/linux/page-flags.h26
1 files changed, 9 insertions, 17 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index b12f93a3c345..219a523ecdb0 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -228,6 +228,7 @@ PAGEFLAG_FALSE(HighMem)
228PAGEFLAG(SwapCache, swapcache) 228PAGEFLAG(SwapCache, swapcache)
229#else 229#else
230PAGEFLAG_FALSE(SwapCache) 230PAGEFLAG_FALSE(SwapCache)
231 SETPAGEFLAG_NOOP(SwapCache) CLEARPAGEFLAG_NOOP(SwapCache)
231#endif 232#endif
232 233
233#ifdef CONFIG_UNEVICTABLE_LRU 234#ifdef CONFIG_UNEVICTABLE_LRU
@@ -372,31 +373,22 @@ static inline void __ClearPageTail(struct page *page)
372#define __PG_MLOCKED 0 373#define __PG_MLOCKED 0
373#endif 374#endif
374 375
375#define PAGE_FLAGS (1 << PG_lru | 1 << PG_private | 1 << PG_locked | \
376 1 << PG_buddy | 1 << PG_writeback | \
377 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active | \
378 __PG_UNEVICTABLE | __PG_MLOCKED)
379
380/*
381 * Flags checked in bad_page(). Pages on the free list should not have
382 * these flags set. It they are, there is a problem.
383 */
384#define PAGE_FLAGS_CLEAR_WHEN_BAD (PAGE_FLAGS | \
385 1 << PG_reclaim | 1 << PG_dirty | 1 << PG_swapbacked)
386
387/* 376/*
388 * Flags checked when a page is freed. Pages being freed should not have 377 * Flags checked when a page is freed. Pages being freed should not have
389 * these flags set. It they are, there is a problem. 378 * these flags set. It they are, there is a problem.
390 */ 379 */
391#define PAGE_FLAGS_CHECK_AT_FREE (PAGE_FLAGS | 1 << PG_reserved) 380#define PAGE_FLAGS_CHECK_AT_FREE \
381 (1 << PG_lru | 1 << PG_private | 1 << PG_locked | \
382 1 << PG_buddy | 1 << PG_writeback | 1 << PG_reserved | \
383 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active | \
384 __PG_UNEVICTABLE | __PG_MLOCKED)
392 385
393/* 386/*
394 * Flags checked when a page is prepped for return by the page allocator. 387 * Flags checked when a page is prepped for return by the page allocator.
395 * Pages being prepped should not have these flags set. It they are, there 388 * Pages being prepped should not have any flags set. It they are set,
396 * is a problem. 389 * there has been a kernel bug or struct page corruption.
397 */ 390 */
398#define PAGE_FLAGS_CHECK_AT_PREP (PAGE_FLAGS | \ 391#define PAGE_FLAGS_CHECK_AT_PREP ((1 << NR_PAGEFLAGS) - 1)
399 1 << PG_reserved | 1 << PG_dirty | 1 << PG_swapbacked)
400 392
401#endif /* !__GENERATING_BOUNDS_H */ 393#endif /* !__GENERATING_BOUNDS_H */
402#endif /* PAGE_FLAGS_H */ 394#endif /* PAGE_FLAGS_H */