]> git.proxmox.com Git - mirror_spl-debian.git/blame - config/kernel-spinlock.m4
dch: close a bug and refresh timestamp.
[mirror_spl-debian.git] / config / kernel-spinlock.m4
CommitLineData
34ee731f
AX
1dnl #
2dnl # 2.6.36 API change,
3dnl # The 'struct fs_struct->lock' was changed from a rwlock_t to
4dnl # a spinlock_t to improve the fastpath performance.
5dnl #
6AC_DEFUN([SPL_AC_FS_STRUCT_SPINLOCK], [
7 AC_MSG_CHECKING([whether struct fs_struct uses spinlock_t])
8 tmp_flags="$EXTRA_KCFLAGS"
9 EXTRA_KCFLAGS="-Werror"
10 SPL_LINUX_TRY_COMPILE([
11 #include <linux/sched.h>
12 #include <linux/fs_struct.h>
13 ],[
14 static struct fs_struct fs;
15 spin_lock_init(&fs.lock);
16 ],[
17 AC_MSG_RESULT(yes)
18 AC_DEFINE(HAVE_FS_STRUCT_SPINLOCK, 1,
19 [struct fs_struct uses spinlock_t])
20 ],[
21 AC_MSG_RESULT(no)
22 ])
23 EXTRA_KCFLAGS="$tmp_flags"
24])