Whamcloud - gitweb
LU-12542 lustre: remove INIT_LIST_HEAD_RCU support. 89/37789/2
authorMr NeilBrown <neilb@suse.de>
Wed, 4 Mar 2020 03:31:16 +0000 (14:31 +1100)
committerOleg Drokin <green@whamcloud.com>
Tue, 31 Mar 2020 07:00:57 +0000 (07:00 +0000)
Not all kernels provide INIT_LIST_HEAD_RCU() so it is provided for
older kernels.  But lustre no longer uses this macro and is unlikely
to - it is rarely used at all.

So remove the back-compat support.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I0556e9c75c575ee269f253a90600788747578593
Reviewed-on: https://review.whamcloud.com/37789
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/autoconf/lustre-core.m4
lustre/include/lustre_compat.h

index 1e23d85..9e53606 100644 (file)
@@ -591,27 +591,6 @@ kiocb_ki_left, [
 ]) # LC_KIOCB_KI_LEFT
 
 #
 ]) # LC_KIOCB_KI_LEFT
 
 #
-# LC_INIT_LIST_HEAD_RCU
-#
-# 3.12 added INIT_LIST_HEAD_RCU in commit 2a855b644c310d5db5
-# which is unfortunately an inline function and not a macro
-# that can be tested directly, so it needs a configure check.
-#
-AC_DEFUN([LC_INIT_LIST_HEAD_RCU], [
-LB_CHECK_COMPILE([if 'INIT_LIST_HEAD_RCU' exists],
-init_list_head_rcu, [
-       #include <linux/list.h>
-       #include <linux/rculist.h>
-],[
-       struct list_head list;
-       INIT_LIST_HEAD_RCU(&list);
-],[
-       AC_DEFINE(HAVE_INIT_LIST_HEAD_RCU, 1,
-                 [INIT_LIST_HEAD_RCU exists])
-])
-]) # LC_INIT_LIST_HEAD_RCU
-
-#
 # LC_VFS_RENAME_5ARGS
 #
 # 3.13 has vfs_rename with 5 args
 # LC_VFS_RENAME_5ARGS
 #
 # 3.13 has vfs_rename with 5 args
@@ -2207,7 +2186,6 @@ AC_DEFUN([LC_PROG_LINUX], [
        LC_OLDSIZE_TRUNCATE_PAGECACHE
        LC_PTR_ERR_OR_ZERO_MISSING
        LC_KIOCB_KI_LEFT
        LC_OLDSIZE_TRUNCATE_PAGECACHE
        LC_PTR_ERR_OR_ZERO_MISSING
        LC_KIOCB_KI_LEFT
-       LC_INIT_LIST_HEAD_RCU
 
        # 3.13
        LC_VFS_RENAME_5ARGS
 
        # 3.13
        LC_VFS_RENAME_5ARGS
index 0d61f4b..53c8a17 100644 (file)
                        vfs_symlink(dir, dentry, path)
 #endif
 
                        vfs_symlink(dir, dentry, path)
 #endif
 
-#ifndef HAVE_INIT_LIST_HEAD_RCU
-static inline void INIT_LIST_HEAD_RCU(struct list_head *list)
-{
-       WRITE_ONCE(list->next, list);
-       WRITE_ONCE(list->prev, list);
-}
-#endif
-
 #ifdef HAVE_BVEC_ITER
 #define bio_idx(bio)                   (bio->bi_iter.bi_idx)
 #define bio_set_sector(bio, sector)    (bio->bi_iter.bi_sector = sector)
 #ifdef HAVE_BVEC_ITER
 #define bio_idx(bio)                   (bio->bi_iter.bi_idx)
 #define bio_set_sector(bio, sector)    (bio->bi_iter.bi_sector = sector)