Whamcloud - gitweb
LU-18687 libcfs: linux-list.h is no longer needed 86/58986/3
authorTimothy Day <timday@amazon.com>
Sun, 6 Apr 2025 05:30:25 +0000 (01:30 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 14 May 2025 03:57:16 +0000 (03:57 +0000)
The linux-list.h header only includes a test for
hlist_add_after(), which is no longer called in the
code. Remove the header.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I34a57ae0d934bccbbc91d55208fe0d57d1eb331a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58986
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
config/lustre-libcfs.m4
libcfs/include/libcfs/linux/Makefile.am
libcfs/include/libcfs/linux/linux-list.h [deleted file]
lustre/ptlrpc/gss/gss_keyring.c

index 0306a2e..f5609a8 100644 (file)
@@ -351,25 +351,6 @@ AC_DEFUN([LIBCFS_HAVE_GLOB],[
 ]) # LIBCFS_HAVE_GLOB
 
 #
-# Kernel version 3.17 changed hlist_add_after to
-# hlist_add_behind
-#
-AC_DEFUN([LIBCFS_SRC_HLIST_ADD_AFTER],[
-       LB2_LINUX_TEST_SRC([hlist_add_after], [
-               #include <linux/list.h>
-       ],[
-               hlist_add_after(NULL, NULL);
-       ])
-])
-AC_DEFUN([LIBCFS_HLIST_ADD_AFTER],[
-       LB2_MSG_LINUX_TEST_RESULT([if function 'hlist_add_after' exist],
-       [hlist_add_after], [
-               AC_DEFINE(HAVE_HLIST_ADD_AFTER, 1,
-                       [hlist_add_after is available])
-       ])
-]) # LIBCFS_HLIST_ADD_AFTER
-
-#
 # Kernel version 3.17 introduced struct timespec64
 #
 AC_DEFUN([LIBCFS_SRC_TIMESPEC64],[
@@ -2563,7 +2544,6 @@ AC_DEFUN([LIBCFS_PROG_LINUX_SRC], [
        # 3.16
        LIBCFS_SRC_HAVE_GLOB
        # 3.17
-       LIBCFS_SRC_HLIST_ADD_AFTER
        LIBCFS_SRC_TIMESPEC64
        LIBCFS_SRC_KTIME_GET_NS
        LIBCFS_SRC_KTIME_GET_REAL_TS64
index 1642f27..5d012f2 100644 (file)
@@ -5,5 +5,5 @@
 #
 
 EXTRA_DIST = linux-misc.h linux-fs.h linux-mem.h linux-time.h linux-cpu.h \
-            linux-list.h linux-wait.h linux-net.h \
+            linux-wait.h linux-net.h \
             refcount.h processor.h linux-fortify-string.h
diff --git a/libcfs/include/libcfs/linux/linux-list.h b/libcfs/include/libcfs/linux/linux-list.h
deleted file mode 100644 (file)
index 21d4900..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-
-#ifndef __LIBCFS_LINUX_LIST_H__
-#define __LIBCFS_LINUX_LIST_H__
-
-#include <linux/list.h>
-
-#ifdef HAVE_HLIST_ADD_AFTER
-#define hlist_add_behind(hnode, tail)  hlist_add_after(tail, hnode)
-#endif /* HAVE_HLIST_ADD_AFTER */
-
-#endif /* __LIBCFS_LINUX_LIST_H__ */
index a21527a..f1b33db 100644 (file)
@@ -24,9 +24,9 @@
 #include <linux/keyctl.h>
 #include <linux/key-type.h>
 #include <linux/mutex.h>
+#include <linux/list.h>
 #include <asm/atomic.h>
 
-#include <libcfs/linux/linux-list.h>
 #include <obd.h>
 #include <obd_class.h>
 #include <obd_support.h>