Whamcloud - gitweb
LU-10565 mdc: add __GFP_COLD for back compatible 00/31200/2
authorYang Sheng <yang.sheng@intel.com>
Fri, 1 Dec 2017 14:44:46 +0000 (22:44 +0800)
committerJohn L. Hammond <john.hammond@intel.com>
Fri, 9 Feb 2018 21:35:50 +0000 (21:35 +0000)
The __GFP_COLD has been removed in upstream. Add
it for compatible.

Lustre-change: https://review.whamcloud.com/31028
Lustre-commit: 8b3cb154856623a03b3cb0dc3e3fbce9a693e831

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: I70d0978fa1cdfb9ea22f0b1511a26b28523048b6
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31200
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/include/lustre_compat.h
lustre/mdc/mdc_request.c

index b3c42f9..96d9f03 100644 (file)
@@ -676,6 +676,11 @@ static inline struct timespec current_time(struct inode *inode)
  */
 #define time_after32(a, b)     ((s32)((u32)(b) - (u32)(a)) < 0)
 #define time_before32(b, a)    time_after32(a, b)
+
+#endif
+
+#ifndef __GFP_COLD
+#define __GFP_COLD 0
 #endif
 
 #endif /* _LUSTRE_COMPAT_H */
index d6c2e7b..b2758ca 100644 (file)
@@ -1215,7 +1215,8 @@ static int mdc_read_page_remote(void *data, struct page *page0)
        }
 
        for (npages = 1; npages < max_pages; npages++) {
-               page = page_cache_alloc_cold(inode->i_mapping);
+               page = __page_cache_alloc(mapping_gfp_mask(inode->i_mapping)
+                                         | __GFP_COLD);
                if (page == NULL)
                        break;
                page_pool[npages] = page;