Whamcloud - gitweb
LU-8056 llite: use inode_lock to access i_mutex
[fs/lustre-release.git] / lustre / autoconf / lustre-core.m4
index 9d74fcd..1b924f2 100644 (file)
@@ -2108,6 +2108,23 @@ file_dentry, [
 ]) # LC_HAVE_FILE_DENTRY
 
 #
+# LC_HAVE_INODE_LOCK
+#
+# 4.5 introduced inode_lock
+#
+AC_DEFUN([LC_HAVE_INODE_LOCK], [
+LB_CHECK_COMPILE([if 'inode_lock' is defined],
+inode_lock, [
+       #include <linux/fs.h>
+],[
+       inode_lock(NULL);
+], [
+       AC_DEFINE(HAVE_INODE_LOCK, 1,
+                 [inode_lock is defined])
+])
+]) # LC_HAVE_INODE_LOCK
+
+#
 # LC_PROG_LINUX
 #
 # Lustre linux kernel checks
@@ -2283,6 +2300,9 @@ AC_DEFUN([LC_PROG_LINUX], [
        # 4.5
        LC_HAVE_FILE_DENTRY
 
+       # 4.5
+       LC_HAVE_INODE_LOCK
+
        #
        AS_IF([test "x$enable_server" != xno], [
                LC_FUNC_DEV_SET_RDONLY