Whamcloud - gitweb
LU-3974 client: use standard dentry locking function
[fs/lustre-release.git] / lustre / autoconf / lustre-core.m4
index 0732b9b..8124d2c 100644 (file)
@@ -1288,6 +1288,25 @@ LB_LINUX_TRY_COMPILE([
 ])
 
 #
+# 3.11 need to access d_count to get dentry reference count
+#
+AC_DEFUN([LC_HAVE_DCOUNT],
+[AC_MSG_CHECKING([if d_count exist])
+LB_LINUX_TRY_COMPILE([
+       #include <linux/dcache.h>
+],[
+       struct dentry de;
+
+       d_count(&de);
+],[
+       AC_DEFINE(HAVE_D_COUNT, 1, [d_count exist])
+       AC_MSG_RESULT([yes])
+],[
+       AC_MSG_RESULT([no])
+])
+])
+
+#
 # LC_PROG_LINUX
 #
 # Lustre linux kernel checks
@@ -1386,6 +1405,9 @@ AC_DEFUN([LC_PROG_LINUX],
         LC_HAVE_ONLY_PROCFS_SEQ
         LC_BLKDEV_RELEASE_RETURN_INT
 
+        # 3.11
+        LC_HAVE_DCOUNT
+
         #
         if test x$enable_server != xno ; then
                LC_FUNC_DEV_SET_RDONLY