summarylogtreecommitdiffstats
path: root/0001-Linux-use-plain-page_cache_alloc.patch
blob: 338b6cc1f500e411a369c753deacd810d60c490b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From 9958cc449c99b2098eb13b2e061c5a981cc1de84 Mon Sep 17 00:00:00 2001
From: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Fri, 22 Dec 2017 14:17:09 +0100
Subject: [PATCH 1/2] Linux: use plain page_cache_alloc

Linux 4.15 removes the distinction between "hot" and "cold" cache
pages, and no longer provides page_cache_alloc_cold(). Simply use
page_cache_alloc() instead, rather than adding yet another test.

Reviewed-on: https://gerrit.openafs.org/12823
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Tested-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit be5f5b2aff2d59986dd8e7dd7dd531be24c27cb2)

Reviewed-on: https://gerrit.openafs.org/12828
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 2ff3ef2ec6f217195dc50c04ba4e3409c23e6a4d)

Change-Id: Iec018dd6591c0cd477a026efd8817ccea7924dce
---
 src/afs/LINUX/osi_vnodeops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
index 051452b34..c2cd4f742 100644
--- a/src/afs/LINUX/osi_vnodeops.c
+++ b/src/afs/LINUX/osi_vnodeops.c
@@ -2033,7 +2033,7 @@ afs_linux_read_cache(struct file *cachefp, struct page *page,
         cachepage = find_get_page(cachemapping, pageindex);
 	if (!cachepage) {
 	    if (!newpage)
-		newpage = page_cache_alloc_cold(cachemapping);
+		newpage = page_cache_alloc(cachemapping);
 	    if (!newpage) {
 		code = -ENOMEM;
 		goto out;
-- 
2.16.1