mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 06:50:12 +00:00
Linux 4.15: check for 2nd argument to pagevec_init
Linux 4.15 removes the distinction between "hot" and "cold" cache pages, and pagevec_init() no longer takes a "cold" flag as the second argument. Add a configure test and use it in osi_vnodeops.c . Change-Id: Ia5287b409b2a811d2250c274579e6f15fd18fdbb Reviewed-on: https://gerrit.openafs.org/12824 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>
This commit is contained in:
parent
be5f5b2aff
commit
fb1f14d8ee
@ -1173,6 +1173,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
|
||||
LINUX_AOP_WRITEBACK_CONTROL
|
||||
LINUX_FS_STRUCT_FOP_HAS_SPLICE
|
||||
LINUX_KERNEL_POSIX_LOCK_FILE_WAIT_ARG
|
||||
LINUX_KERNEL_PAGEVEC_INIT_COLD_ARG
|
||||
LINUX_POSIX_TEST_LOCK_RETURNS_CONFLICT
|
||||
LINUX_POSIX_TEST_LOCK_CONFLICT_ARG
|
||||
LINUX_KERNEL_SOCK_CREATE
|
||||
|
@ -2235,7 +2235,11 @@ afs_linux_readpage_fastpath(struct file *fp, struct page *pp, int *codep)
|
||||
AFS_GLOCK();
|
||||
goto out;
|
||||
}
|
||||
#if defined(PAGEVEC_INIT_COLD_ARG)
|
||||
pagevec_init(&lrupv, 0);
|
||||
#else
|
||||
pagevec_init(&lrupv);
|
||||
#endif
|
||||
|
||||
code = afs_linux_read_cache(cacheFp, pp, tdc->f.chunk, &lrupv, NULL);
|
||||
|
||||
@ -2395,7 +2399,11 @@ afs_linux_bypass_readpages(struct file *fp, struct address_space *mapping,
|
||||
ancr->offset = auio->uio_offset;
|
||||
ancr->length = auio->uio_resid;
|
||||
|
||||
#if defined(PAGEVEC_INIT_COLD_ARG)
|
||||
pagevec_init(&lrupv, 0);
|
||||
#else
|
||||
pagevec_init(&lrupv);
|
||||
#endif
|
||||
|
||||
for(page_ix = 0; page_ix < num_pages; ++page_ix) {
|
||||
|
||||
@ -2616,7 +2624,11 @@ afs_linux_readpages(struct file *fp, struct address_space *mapping,
|
||||
task = afs_pagecopy_init_task();
|
||||
|
||||
tdc = NULL;
|
||||
#if defined(PAGEVEC_INIT_COLD_ARG)
|
||||
pagevec_init(&lrupv, 0);
|
||||
#else
|
||||
pagevec_init(&lrupv);
|
||||
#endif
|
||||
for (page_idx = 0; page_idx < num_pages; page_idx++) {
|
||||
struct page *page = list_entry(page_list->prev, struct page, lru);
|
||||
list_del(&page->lru);
|
||||
|
@ -149,6 +149,16 @@ AC_DEFUN([LINUX_KERNEL_POSIX_LOCK_FILE_WAIT_ARG], [
|
||||
[])
|
||||
])
|
||||
|
||||
AC_DEFUN([LINUX_KERNEL_PAGEVEC_INIT_COLD_ARG], [
|
||||
AC_CHECK_LINUX_BUILD([for 2nd argument in pagevec_init found in pre-4.15 kernels],
|
||||
[ac_cv_linux_kernel_pagevec_init_cold_arg],
|
||||
[#include <linux/pagevec.h>],
|
||||
[pagevec_init(0,0);],
|
||||
[PAGEVEC_INIT_COLD_ARG],
|
||||
[define if your kernel uses 2 arguments for pagevec_init],
|
||||
[])
|
||||
])
|
||||
|
||||
AC_DEFUN([LINUX_KERNEL_SOCK_CREATE], [
|
||||
AC_CHECK_LINUX_BUILD([for 5th argument in sock_create found in some SELinux kernels],
|
||||
[ac_cv_linux_kernel_sock_create_v],
|
||||
|
Loading…
Reference in New Issue
Block a user