2 dnl # 2.6.36 API change,
3 dnl # The 'struct fs_struct->lock' was changed from a rwlock_t to
4 dnl # a spinlock_t to improve the fastpath performance.
6 AC_DEFUN([ZFS_AC_KERNEL_FS_STRUCT_SPINLOCK], [
7 AC_MSG_CHECKING([whether struct fs_struct uses spinlock_t])
8 tmp_flags="$EXTRA_KCFLAGS"
9 EXTRA_KCFLAGS="-Werror"
10 ZFS_LINUX_TRY_COMPILE([
11 #include <linux/sched.h>
12 #include <linux/fs_struct.h>
14 static struct fs_struct fs;
15 spin_lock_init(&fs.lock);
18 AC_DEFINE(HAVE_FS_STRUCT_SPINLOCK, 1,
19 [struct fs_struct uses spinlock_t])
23 EXTRA_KCFLAGS="$tmp_flags"