]> git.michaelhowe.org Git - packages/o/openafs.git/commit
LINUX-5.7: replace __pagevec_lru_add with lru_cache_add_file
authorCheyenne Wills <cwills@sinenomine.net>
Fri, 15 May 2020 16:40:20 +0000 (10:40 -0600)
committerStephan Wiesand <stephan.wiesand@desy.de>
Fri, 12 Jun 2020 15:39:36 +0000 (11:39 -0400)
commitb7c5502516333d41aa1fa046c918dfece722f77c
tree4a2bafe82388a5d8a590cd752e958ac6fbedea37
parent81581b362af86b4f636d8e411e9cb8f1cf86f723
LINUX-5.7: replace __pagevec_lru_add with lru_cache_add_file

The Linux function __pagevec_lru_add is no longer exported in Linux
5.7-rc1 commit bde07cfc65da5fe6c63fe23f035f5ccc0ffd89e0
"mm/swap.c: not necessary to export __pagevec_lru_add()".

As a replacement, the Linux function lru_cache_add_file can be used for
adding a page to the lru cache.  The internal processing of
lru_cache_add_file manages its own internal pagevec and performs the
following:
     get_page(...)
     if(!pagevec_add(...))
        __pagevec_lru_add_file(...)

Introduce an autoconf test for lru_cache_add_file and replace the calls
associated with __pagevec_lru_add with lru_cache_add_file.

NOTE: see Linux commit a0b8cab3b9b2efadabdcff264c450ca515e2619c
"mm: remove lru parameter from __pagevec_lru_add and remove parts of
pagevec API" as a reference for this change.

The lru_cache_add_file was introduced in Linux 2.6.28, therefore this
change affects systems with Linux 2.6.28 kernels and later.

Reviewed-on: https://gerrit.openafs.org/14159
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 17b42fe67c18fab0003fb712092d36f06c93f2eb)

Change-Id: I206925d1659164a54e0c3a41b82a1733cb656b41
Reviewed-on: https://gerrit.openafs.org/14210
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/LINUX/osi_vnodeops.c
src/cf/linux-kernel-func.m4