OpenAFS Master Repository branch, openafs-stable-1_8_x, updated. openafs-stable-1_8_9pre1-3-gfdf3848

Gerrit Code Review
Thu, 3 Nov 2022 10:55:01 -0400

The following commit has been merged in the openafs-stable-1_8_x branch:
commit fdf38483c7765270c24a01b65fc3d1173509136e
Author: Cheyenne Wills <>
Date:   Thu Sep 22 13:04:59 2022 -0600

    Linux-6.0: Replace add_to_page_cache
    Linux 6.0 removed the add_to_page_cache function in the Linux commit:
        'filemap: Remove add_to_page_cache() and add_to_page_cache_locked()'
    The replacement function, filemap_add_folio function is exported as GPL,
    but a non-GPL wrapper was provided in the Linux 5.15 commit:
        'mm/filemap: Add filemap_add_folio()'
    which changed the GPL exported function add_to_page_cache_lru to a
    non-GPL exported function.
    The function add_to_page_cache_lru functionally combines the
    add_to_page_cache with lru_cache_add.  Within afs, all the calls to
    add_to_page_cache follow the pattern of calling the lru_cache_add
    via the wrapper afs_lru_cache_add immediately after (except in one case
    noted below).
    Add an autoconf check to see if add_to_page_cache_lru is available.
    Introduce a new wrapper function afs_add_to_page_cache_lru that handles
    calling either add_to_page_cache/afs_lru_cache_add or
    As noted above there is one function, afs_linux_bypass_readpages, that
    calls add_to_page_cache but does not immediately call afs_lru_cache_add.
    This function is only used in Linux kernels prior to 5.18, see the
        'Linux-5.18: replace readpages with readahead' (7a181415db)
    Since this code path is only built for a Linux kernel level where
    add_to_page_cache should also exists, we do not replace this call.
    The add_to_page_cache_lru was moved into mm/folio-compat.c which has a
    comment indicating that callers of these functions should migrate to
    folio calls.  However the replacement folio call that is needed by afs,
    filemap_add_folio, is exported as GPL.
    Tested-by: BuildBot <>
    Reviewed-by: Andrew Deason <>
    Reviewed-by: Michael Meffie <>
    Reviewed-by: Benjamin Kaduk <>
    (cherry picked from commit 0ce315f0cee1cff7e19e6ebcc0e0e82e03719c20)
    Change-Id: Ic0496c2fba00e7be467dbbcf52d9854495e1ad9f
    Tested-by: BuildBot <>
    Reviewed-by: Michael Meffie <>
    Reviewed-by: Andrew Deason <>
    Reviewed-by: Cheyenne Wills <>
    Reviewed-by: Mark Vitale <>
    Reviewed-by: Harish Sharma <>
    Reviewed-by: Stephan Wiesand <>

 src/afs/LINUX/osi_vnodeops.c | 30 ++++++++++++++++++++++--------
 src/cf/linux-kernel-func.m4  | 10 ++++++++++
 2 files changed, 32 insertions(+), 8 deletions(-)

OpenAFS Master Repository