From ef517bc8d3ff842e82dd12b58393d9c10241b9c2 Mon Sep 17 00:00:00 2001 From: bobijam Date: Tue, 15 Sep 2009 01:43:14 +0000 Subject: [PATCH] Branch HEAD b=17517 i=robert.read i=sheng.yang restore LC_FUNC_F_OP_FLOCK config check on HEAD. --- lustre/autoconf/lustre-core.m4 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 551de56..3d84217 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -1296,6 +1296,27 @@ LB_LINUX_TRY_COMPILE([ ]) ]) +# +# LC_FUNC_F_OP_FLOCK +# +# rhel4.2 kernel has f_op->flock field +# +AC_DEFUN([LC_FUNC_F_OP_FLOCK], +[AC_MSG_CHECKING([if struct file_operations has flock field]) +LB_LINUX_TRY_COMPILE([ + #include +],[ + struct file_operations ll_file_operations_flock; + ll_file_operations_flock.flock = NULL; +],[ + AC_DEFINE(HAVE_F_OP_FLOCK, 1, + [struct file_operations has flock field]) + AC_MSG_RESULT([yes]) +],[ + AC_MSG_RESULT([no]) +]) +]) + # vfs_symlink seems to have started out with 3 args until 2.6.7 where a # "mode" argument was added, but then again, in some later version it was # removed @@ -1396,6 +1417,7 @@ AC_DEFUN([LC_PROG_LINUX], LC_CONFIG_GSS LC_FUNC_MS_FLOCK_LOCK LC_FUNC_HAVE_CAN_SLEEP_ARG + LC_FUNC_F_OP_FLOCK LC_QUOTA_READ LC_COOKIE_FOLLOW_LINK LC_FUNC_RCU -- 1.8.3.1