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 <matt@linuxbox.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
/* 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);