]> git.proxmox.com Git - mirror_spl-debian.git/blob - config/kernel-inode-lock.m4
dch: close a bug and refresh timestamp.
[mirror_spl-debian.git] / config / kernel-inode-lock.m4
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([SPL_AC_INODE_LOCK], [
8 AC_MSG_CHECKING([whether inode_lock_shared() exists])
9 tmp_flags="$EXTRA_KCFLAGS"
10 EXTRA_KCFLAGS="-Werror"
11 SPL_LINUX_TRY_COMPILE([
12 #include <linux/fs.h>
13 ],[
14 struct inode *inode = NULL;
15 inode_lock_shared(inode);
16 ],[
17 AC_MSG_RESULT(yes)
18 AC_DEFINE(HAVE_INODE_LOCK_SHARED, 1, [yes])
19 ],[
20 AC_MSG_RESULT(no)
21 ])
22 EXTRA_KCFLAGS="$tmp_flags"
23 ])