From: Jian Yu Date: Mon, 27 Jun 2022 17:30:16 +0000 (-0700) Subject: LU-15973 build: remove AC_DEFINE(__state, state, ...) X-Git-Tag: 2.15.51~78 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=f4c65e01a2e58b2bae770770590494d85ef636f7;p=fs%2Flustre-release.git 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 bb7c82f13e7a01891edcdf0626c6fb91a240e56e and a proper way to resolve the original issue was in commit c04adbcd76725a360f411f09c63df785bf7db426. So, let's remove the improper way AC_DEFINE(__state, state, ...). Test-Parameters: trivial fstype=ldiskfs \ clientdistro=el8.6 serverdistro=el8.6 testlist=sanity Test-Parameters: trivial fstype=zfs \ clientdistro=el8.6 serverdistro=el8.6 testlist=sanity Change-Id: Icbc897cf5870352311262af8bd59ec24ea9d7301 Fixes: bb7c82f13e7 ("LU-15795 kernel: RHEL 8.6 server support") Signed-off-by: Jian Yu Reviewed-on: https://review.whamcloud.com/47799 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Minh Diep Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 11d69e7..57c5576 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -2602,29 +2602,6 @@ EXTRA_KCFLAGS="$tmp_flags" ]) # LC_HAVE_USER_NAMESPACE_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 - -# # LC_HAVE_GET_ACL_RCU_ARG # # kernel 5.15 commit 0cad6246621b5887d5b33fea84219d2a71f2f99a @@ -2845,9 +2822,6 @@ AC_DEFUN([LC_PROG_LINUX], [ # 5.12 LC_HAVE_USER_NAMESPACE_ARG - # 5.13 - LC_TASK_STRUCT_HAS_NEW_STATE - # 5.15 LC_HAVE_GET_ACL_RCU_ARG