summaryrefslogtreecommitdiff
path: root/backport
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2015-09-13 13:09:15 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2015-11-15 22:12:50 +0100
commit05817a0b96d5ef4ba561d0d9da8e325c7a7436e0 (patch)
tree8669b36713a8ff0456939457afa6d133ef98a0f8 /backport
parent907244a8812becdbb38d28f32a09b462a0560985 (diff)
header: add page_is_pfmemalloc()
Upstream commit: 2fdda07a83179d14f41a15bf88ae396dae9d218d This adds page_is_pfmemalloc() which is used by the igb driver. The direct access to page->pfmemalloc was replaced by this function call in 54d985ce23 upstream commit. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'backport')
-rw-r--r--backport/backport-include/linux/mm.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/backport/backport-include/linux/mm.h b/backport/backport-include/linux/mm.h
index 96be9e6f..ddb88134 100644
--- a/backport/backport-include/linux/mm.h
+++ b/backport/backport-include/linux/mm.h
@@ -95,4 +95,13 @@ static inline unsigned long *frame_vector_pfns(struct frame_vector *vec)
}
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) && \
+ LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
+#define page_is_pfmemalloc LINUX_BACKPORT(page_is_pfmemalloc)
+static inline bool page_is_pfmemalloc(struct page *page)
+{
+ return page->pfmemalloc;
+}
+#endif /* < 4.2 */
+
#endif /* __BACKPORT_MM_H */