From: Mr NeilBrown Date: Wed, 4 Mar 2020 03:31:16 +0000 (+1100) Subject: LU-12542 lustre: remove INIT_LIST_HEAD_RCU support. X-Git-Tag: 2.13.53~12 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=7b560d63759dbee2ac232bbe93a5071f8b0ebd1c LU-12542 lustre: remove INIT_LIST_HEAD_RCU support. 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 Change-Id: I0556e9c75c575ee269f253a90600788747578593 Reviewed-on: https://review.whamcloud.com/37789 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Simmons Tested-by: James Simmons Reviewed-by: Yang Sheng Reviewed-by: Shaun Tancheff Reviewed-by: Oleg Drokin --- diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 1e23d85..9e53606 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -591,27 +591,6 @@ 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 - #include -],[ - 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 @@ -2207,7 +2186,6 @@ AC_DEFUN([LC_PROG_LINUX], [ 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 diff --git a/lustre/include/lustre_compat.h b/lustre/include/lustre_compat.h index 0d61f4b..53c8a17 100644 --- a/lustre/include/lustre_compat.h +++ b/lustre/include/lustre_compat.h @@ -56,14 +56,6 @@ 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)