File 93d2da1.diff of Package openafs
From 93d2da11307b9cd3c5f00b9d23fc4c2664e3a264 Mon Sep 17 00:00:00 2001
From: Andrew Deason <adeason@sinenomine.net>
Date: Fri, 27 Jun 2025 13:33:18 -0500
Subject: [PATCH] LINUX: Remove test for DCACHE_NFSFS_RENAMED
The symbol DCACHE_NFSFS_RENAMED has existed in Linux for a long time,
well before the 2.6 version series. This is before our minimum supported
Linux kernel version of 2.6.18, so we don't need to check for it
anymore. Remove the configure test, and remove all references to
HAVE_DCACHE_NFSFS_RENAMED (assuming it's always true).
Keep the afs_linux_clear_nfsfs_renamed() et al abstractions, since they
may help keep the code more readable, but fix their formatting while
we're here.
Reviewed-on: https://gerrit.openafs.org/16409
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
(cherry picked from commit f0f3fe56769b219f4741457948394b7f1b0b5b7a)
Change-Id: I95b1fa2fff35bac5dfe1b0d3fced6744ca87e9e7
---
diff --git a/src/afs/LINUX/osi_compat.h b/src/afs/LINUX/osi_compat.h
index 0fc72a3..71e9507 100644
--- a/src/afs/LINUX/osi_compat.h
+++ b/src/afs/LINUX/osi_compat.h
@@ -123,30 +123,27 @@
#endif
}
-#ifdef HAVE_DCACHE_NFSFS_RENAMED
static inline void
-afs_linux_clear_nfsfs_renamed(struct dentry *dp) {
+afs_linux_clear_nfsfs_renamed(struct dentry *dp)
+{
spin_lock(&dp->d_lock);
dp->d_flags &= ~DCACHE_NFSFS_RENAMED;
spin_unlock(&dp->d_lock);
}
static inline void
-afs_linux_set_nfsfs_renamed(struct dentry *dp) {
+afs_linux_set_nfsfs_renamed(struct dentry *dp)
+{
spin_lock(&dp->d_lock);
dp->d_flags |= DCACHE_NFSFS_RENAMED;
spin_unlock(&dp->d_lock);
}
static inline int
-afs_linux_nfsfs_renamed(struct dentry *dp) {
+afs_linux_nfsfs_renamed(struct dentry *dp)
+{
return dp->d_flags & DCACHE_NFSFS_RENAMED;
}
-
-#else
-static inline void afs_linux_clear_nfsfs_renamed(void) { return; }
-static inline void afs_linux_set_nfsfs_renamed(void) { return; }
-#endif
#ifndef HAVE_LINUX_HLIST_UNHASHED
static void
diff --git a/src/cf/linux-kernel-symbol.m4 b/src/cf/linux-kernel-symbol.m4
index c89224a..79493dc 100644
--- a/src/cf/linux-kernel-symbol.m4
+++ b/src/cf/linux-kernel-symbol.m4
@@ -4,8 +4,4 @@
dnl Linux 2.6.38 introduced DCACHE_NEED_AUTOMOUNT, and Linux 6.15 converted it
dnl from a #define to an enum.
AC_CHECK_LINUX_SYMBOL([DCACHE_NEED_AUTOMOUNT], [dcache.h])
-
-dnl DCACHE_NFSFS_RENAMED was introduced before Linux 2.6, and Linux 6.15
-dnl converted it from a #define to an enum.
-AC_CHECK_LINUX_SYMBOL([DCACHE_NFSFS_RENAMED], [dcache.h])
])