From: Simon Wilkinson Date: Wed, 30 Jun 2010 07:29:28 +0000 (+0100) Subject: Linux: Fix pagevec use in cache-bypass X-Git-Tag: openafs-devel-1_5_75~26 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=232024676d396ab771d6d228158d606240114bb0;p=packages%2Fo%2Fopenafs.git 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 --- 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);