From 76bf16d1e12cd3c2d2f48a31e3e6c1ad66523638 Mon Sep 17 00:00:00 2001 From: Bobi Jam Date: Tue, 24 Jul 2012 16:40:31 +0800 Subject: [PATCH] LU-1484 lprocfs: refine LC_PROCFS_USERS check In some RHEL patched 2.6.18 kernels, pde_users member is added in another struct proc_dir_entry_aux instead of in struct proc_dir_entry in later kernel version of 2.6.23. Signed-off-by: Bobi Jam Change-Id: Icee65893b2fbf4d0c3b3e957cb038be99aaf6eb8 Reviewed-on: http://review.whamcloud.com/3455 Tested-by: Hudson Reviewed-by: Niu Yawei Reviewed-by: Lai Siyao Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/autoconf/lustre-core.m4 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index f67f95f..6f6fd31 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -964,7 +964,19 @@ LB_LINUX_TRY_COMPILE([ AC_DEFINE(HAVE_PROCFS_USERS, 1, [kernel has pde_users member in procfs entry struct]) ],[ - AC_MSG_RESULT([no]) + LB_LINUX_TRY_COMPILE([ + #include "$LINUX/fs/proc/internal.h" + ],[ + struct proc_dir_entry_aux pde_aux; + + pde_aux.pde_users = 0; + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_PROCFS_USERS, 1, + [kernel has pde_users member in proc_dir_entry_aux]) + ],[ + AC_MSG_RESULT([no]) + ]) ]) ]) -- 1.8.3.1