]> git.proxmox.com Git - mirror_zfs-debian.git/blame - config/kernel-blk-end-request.m4
Update SAs when an inode is dirtied
[mirror_zfs-debian.git] / config / kernel-blk-end-request.m4
CommitLineData
c9c0d073
BB
1dnl #
2dnl # 2.6.31 API change
3dnl # In 2.6.29 kernels blk_end_request() was a GPL-only symbol, this was
4dnl # changed in 2.6.31 so it may be used by non-GPL modules.
5dnl #
6AC_DEFUN([ZFS_AC_KERNEL_BLK_END_REQUEST], [
7 AC_MSG_CHECKING([whether blk_end_request() is available])
b9c59ec8
PS
8 tmp_flags="$EXTRA_KCFLAGS"
9 EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
c9c0d073
BB
10 ZFS_LINUX_TRY_COMPILE([
11 #include <linux/blkdev.h>
12 ],[
13 struct request *req = NULL;
14 (void) blk_end_request(req, 0, 0);
15 ],[
16 AC_MSG_RESULT(yes)
17 AC_DEFINE(HAVE_BLK_END_REQUEST, 1,
18 [blk_end_request() is available])
19 ],[
20 AC_MSG_RESULT(no)
21 ])
22
23 AC_MSG_CHECKING([whether blk_end_request() is GPL-only])
24 ZFS_LINUX_TRY_COMPILE([
25 #include <linux/module.h>
26 #include <linux/blkdev.h>
27
28 MODULE_LICENSE("CDDL");
29 ],[
30 struct request *req = NULL;
31 (void) blk_end_request(req, 0, 0);
32 ],[
33 AC_MSG_RESULT(no)
34 ],[
35 AC_MSG_RESULT(yes)
36 AC_DEFINE(HAVE_BLK_END_REQUEST_GPL_ONLY, 1,
37 [blk_end_request() is GPL-only])
38 ])
b9c59ec8 39 EXTRA_KCFLAGS="$tmp_flags"
c9c0d073 40])