From 232024676d396ab771d6d228158d606240114bb0 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Wed, 30 Jun 2010 08:29:28 +0100 Subject: [PATCH] Linux: Fix pagevec use in cache-bypass Cache-bypass was still using the old style pagevec manipulation functions, and so won't build on newer kernels. Update it to use the same pagevec functions as the generic readpages code. FIXES 127505 Change-Id: I9d8acaf3165bbdf24068bd9145a2369cd0c87e4d Reviewed-on: http://gerrit.openafs.org/2298 Reviewed-by: Matt Benjamin Tested-by: Marc Dionne Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear --- src/afs/LINUX/osi_vnodeops.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 324820b12..b6406938d 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -1776,14 +1776,15 @@ afs_linux_bypass_readpages(struct file *fp, struct address_space *mapping, /* and put it on the LRU cache */ if (!pagevec_add(&lrupv, pp)) - __pagevec_lru_add(&lrupv); + __pagevec_lru_add_file(&lrupv); } } /* If there were useful pages in the page list, make sure all pages * are in the LRU cache, then schedule the read */ if(page_count) { - pagevec_lru_add(&lrupv); + if (pagevec_count(&lrupv)) + __pagevec_lru_add_file(&lrupv); credp = crref(); code = afs_ReadNoCache(avc, ancr, credp); crfree(credp); -- 2.39.5