]>
Commit | Line | Data |
---|---|---|
34ee731f AX |
1 | dnl # |
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. | |
5 | dnl # | |
6 | AC_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 | ]) |