ztest: update ztest_dmu_snapshot_create_destroy()
[zfs.git] / config / kernel-inode-lock.m4
blob5eb04af7877144b4d029fbdf91983d980f1d5536
1 dnl #
2 dnl # 4.7 API change
3 dnl # i_mutex is changed to i_rwsem. Instead of directly using
4 dnl # i_mutex/i_rwsem, we should use inode_lock() and inode_lock_shared()
5 dnl # We test inode_lock_shared because inode_lock is introduced earlier.
6 dnl #
7 AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_LOCK], [
8         ZFS_LINUX_TEST_SRC([inode_lock], [
9                 #include <linux/fs.h>
10         ],[
11                 struct inode *inode = NULL;
12                 inode_lock_shared(inode);
13         ])
16 AC_DEFUN([ZFS_AC_KERNEL_INODE_LOCK], [
17         AC_MSG_CHECKING([whether inode_lock_shared() exists])
18         ZFS_LINUX_TEST_RESULT([inode_lock], [
19                 AC_MSG_RESULT(yes)
20                 AC_DEFINE(HAVE_INODE_LOCK_SHARED, 1, [yes])
21         ],[
22                 AC_MSG_RESULT(no)
23         ])