From f182c9e8086f4ecb7c65fc946e0465a8d59083fd Mon Sep 17 00:00:00 2001 From: Jian Yu Date: Mon, 27 Jun 2022 10:30:16 -0700 Subject: [PATCH] LU-15973 build: remove AC_DEFINE(__state, state, ...) RHEL 8.6 build failed with MLNX_OFED 5.6-2.0.9.0 as follows: error: 'struct task_struct' has no member named 'state'; did you mean '__state'? #define __state state ^~~~~ The failure was introduced by commit bb7c82f13e7a and a proper way to resolve the original issue was in commit c04adbcd7672. So, let's remove the improper way AC_DEFINE(__state, state, ...). Lustre-change: https://review.whamcloud.com/47799 Lustre-commit: TBD (from 66c98e324b0182e781743cab4e938b18b6ef4255) Test-Parameters: trivial clientdistro=el8.6 testlist=sanity Fixes: bb7c82f13e7 ("LU-15795 kernel: RHEL 8.6 server support") Signed-off-by: Jian Yu Change-Id: Icbc897cf5870352311262af8bd59ec24ea9d7301 Reviewed-on: https://review.whamcloud.com/47804 Reviewed-by: Andreas Dilger Tested-by: Andreas Dilger --- lustre/autoconf/lustre-core.m4 | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 3507962..e7f0848 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -2417,29 +2417,6 @@ get_acl_rcu_argument, [ EXTRA_KCFLAGS="$tmp_flags" ]) # LC_HAVE_GET_ACL_RCU_ARG -# -# LC_TASK_STRUCT_HAS_NEW_STATE -# -# kernel 5.13 commit 2f064a59a11ff9bc22e52e9678bc601404c7cb34 -# Change the type and name of task_struct::state. Drop the volatile and -# shrink it to an 'unsigned int'. Rename it in order to find all uses -# such that we can use READ_ONCE/WRITE_ONCE as appropriate. -# -AC_DEFUN([LC_TASK_STRUCT_HAS_NEW_STATE], [ -tmp_flags="$EXTRA_KCFLAGS" -EXTRA_KCFLAGS="-Werror" -LB_CHECK_COMPILE([if 'struct task_struct' has a '__state' member], -task_struct_state, [ - #include -],[ - ((struct task_struct *)NULL)->__state = 0; -],[ - AC_DEFINE(__state, state, - ['struct task_struct' has a '__state' member]) -]) -EXTRA_KCFLAGS="$tmp_flags" -]) # LC_TASK_STRUCT_HAS_NEW_STATE - AC_DEFUN([LC_PROG_LINUX_SRC], []) AC_DEFUN([LC_PROG_LINUX_RESULTS], []) @@ -2630,9 +2607,6 @@ AC_DEFUN([LC_PROG_LINUX], [ # 5.15 LC_HAVE_GET_ACL_RCU_ARG - # 5.13 - LC_TASK_STRUCT_HAS_NEW_STATE - # kernel patch to extend integrity interface LC_BIO_INTEGRITY_PREP_FN -- 1.8.3.1