The branch main has been updated by dumbbell:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=585cdb74f4a6a578fc307ed5af940708c26acde4

commit 585cdb74f4a6a578fc307ed5af940708c26acde4
Author:     Jean-Sébastien Pédron <dumbb...@freebsd.org>
AuthorDate: 2025-02-05 18:08:29 +0000
Commit:     Jean-Sébastien Pédron <dumbb...@freebsd.org>
CommitDate: 2025-02-19 20:39:46 +0000

    linuxkpi: Defaults to `get_file_rcu()` version from Linux 6.7
    
    To use the old version, one has to explicitly set `LINUXKPI_VERSION` to
    the expected version of Linux KPI.
    
    Reported by:    bz
    Reviewed by:    bz
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D48860
---
 sys/compat/linuxkpi/common/include/linux/fs.h | 8 ++++----
 sys/compat/linuxkpi/common/src/linux_compat.c | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sys/compat/linuxkpi/common/include/linux/fs.h 
b/sys/compat/linuxkpi/common/include/linux/fs.h
index 56de0e3e490a..76a81e676744 100644
--- a/sys/compat/linuxkpi/common/include/linux/fs.h
+++ b/sys/compat/linuxkpi/common/include/linux/fs.h
@@ -264,17 +264,17 @@ get_file(struct linux_file *f)
        return (f);
 }
 
-struct linux_file * linux67_get_file_rcu(struct linux_file **f);
+struct linux_file * linux_get_file_rcu(struct linux_file **f);
 struct linux_file * get_file_active(struct linux_file **f);
-#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60700
-#define        get_file_rcu(f) linux67_get_file_rcu(f)
-#else
+#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION < 60700
 static inline bool
 get_file_rcu(struct linux_file *f)
 {
        return (refcount_acquire_if_not_zero(
            f->_file == NULL ? &f->f_count : &f->_file->f_count));
 }
+#else
+#define        get_file_rcu(f) linux_get_file_rcu(f)
 #endif
 
 static inline struct inode *
diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c 
b/sys/compat/linuxkpi/common/src/linux_compat.c
index 3e2938ab2c2b..af6cc01d8020 100644
--- a/sys/compat/linuxkpi/common/src/linux_compat.c
+++ b/sys/compat/linuxkpi/common/src/linux_compat.c
@@ -1105,7 +1105,7 @@ __get_file_rcu(struct linux_file **f)
 }
 
 struct linux_file *
-linux67_get_file_rcu(struct linux_file **f)
+linux_get_file_rcu(struct linux_file **f)
 {
        struct linux_file *file1;
 

Reply via email to