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.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index c88d2a9451a..b5d13841604 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -7,6 +7,7 @@
7 7
8#include <linux/types.h> 8#include <linux/types.h>
9#include <linux/bug.h> 9#include <linux/bug.h>
10#include <linux/mmdebug.h>
10#ifndef __GENERATING_BOUNDS_H 11#ifndef __GENERATING_BOUNDS_H
11#include <linux/mm_types.h> 12#include <linux/mm_types.h>
12#include <generated/bounds.h> 13#include <generated/bounds.h>
@@ -453,6 +454,34 @@ static inline int PageTransTail(struct page *page)
453} 454}
454#endif 455#endif
455 456
457/*
458 * If network-based swap is enabled, sl*b must keep track of whether pages
459 * were allocated from pfmemalloc reserves.
460 */
461static inline int PageSlabPfmemalloc(struct page *page)
462{
463 VM_BUG_ON(!PageSlab(page));
464 return PageActive(page);
465}
466
467static inline void SetPageSlabPfmemalloc(struct page *page)
468{
469 VM_BUG_ON(!PageSlab(page));
470 SetPageActive(page);
471}
472
473static inline void __ClearPageSlabPfmemalloc(struct page *page)
474{
475 VM_BUG_ON(!PageSlab(page));
476 __ClearPageActive(page);
477}
478
479static inline void ClearPageSlabPfmemalloc(struct page *page)
480{
481 VM_BUG_ON(!PageSlab(page));
482 ClearPageActive(page);
483}
484
456#ifdef CONFIG_MMU 485#ifdef CONFIG_MMU
457#define __PG_MLOCKED (1 << PG_mlocked) 486#define __PG_MLOCKED (1 << PG_mlocked)
458#else 487#else