OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_2-438-ga99b2ff

Gerrit Code Review gerrit@openafs.org
Mon, 16 Mar 2026 10:19:43 -0400


The following commit has been merged in the master branch:
commit a99b2ff4c04a9b1a4ba3ab5fac1b37bfd5d43568
Author: Cheyenne Wills <cwills@sinenomine.net>
Date:   Tue Mar 10 14:24:54 2026 -0600

    Linux: Use set_default_d_op() to set dentry ops
    
    The Linux 6.17 commit:
        'new helper: set_default_d_op()' (05fb0e666495c)
    replaced the way that the default dentry_operations is set on a
    super_block. The s_d_op member was renamed to __s_d_op and a new helper
    function set_default_d_op() is now used to set the default
    dentry_operations.
    
    The OpenAFS commit 'linux: 2.6.38: New d_op handling' (08bb83d950) added
    an autoconf test for using the s_d_op member in the super_block struct.
    With the above Linux commit, the test for STRUCT_SUPER_BLOCK_HAS_S_D_OP
    fails, and the __s_d_op member in the super_block is not set during
    afs_fill_super(), but instead dp->d_op is set during various vfs
    operations. Doing so sets the dentry ops for the dentry, but does not
    set the flag DCACHE_OP_REVALIDATE on the dentry, and so Linux never
    calls our d_revalidate function, causing dentries to not get properly
    revalidated.
    
    To fix this, add a new autoconf test for set_default_d_op(), and use
    that function when available. Add a comment for the autoconf test for
    the super_block member s_d_op to note the change.  Add an additional
    build time check to ensure that we don't accidentally revert to the
    pre-2.6.38 behavior after Linux 2.6.38
    
    In afs_fill_super(), use set_default_d_op() to initialize the
    super_block with the afs_dentry_operations.
    
    The dentry->d_op member only needs to be updated when set_default_d_op()
    is not available and the super_block does not have the s_d_op member.
    
    Note: This commit fixes a reported problem with stale dentries that was
    discovered on a Linux 6.17 system.
    
    Change-Id: Id1df624df68bf87907dd61ff884fa2d580b2c84a
    Reviewed-on: https://gerrit.openafs.org/16700
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>
    Tested-by: Michael Meffie <mmeffie@sinenomine.net>
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>

 src/afs/LINUX/osi_vfsops.c    |  8 ++++++--
 src/afs/LINUX/osi_vnodeops.c  |  6 +++---
 src/cf/linux-kernel-func.m4   | 10 ++++++++++
 src/cf/linux-kernel-struct.m4 |  4 ++++
 4 files changed, 23 insertions(+), 5 deletions(-)

-- 
OpenAFS Master Repository