]> git.pld-linux.org Git - packages/zfs.git/blame - linux-4.0.patch
- fix building with linux 4.0
[packages/zfs.git] / linux-4.0.patch
CommitLineData
4be71d8b
JR
1--- zfs-0.6.3/config/kernel-bdi-setup-and-register.m4.orig 2014-06-12 22:58:09.000000000 +0200
2+++ zfs-0.6.3/config/kernel-bdi-setup-and-register.m4 2015-04-19 14:12:52.429710415 +0200
3@@ -9,8 +9,13 @@
4 [AC_MSG_CHECKING([whether bdi_setup_and_register() is available])
5 ZFS_LINUX_TRY_COMPILE_SYMBOL([
6 #include <linux/backing-dev.h>
7+ #include <linux/version.h>
8 ], [
9+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
10+ int r = bdi_setup_and_register(NULL, NULL);
11+ #else
12 int r = bdi_setup_and_register(NULL, NULL, 0);
13+ #endif
14 r = *(&r);
15 ], [bdi_setup_and_register], [mm/backing-dev.c], [
16 AC_MSG_RESULT(yes)
17--- zfs-0.6.3/module/zfs/zfs_vfsops.c~ 2014-06-12 22:58:09.000000000 +0200
18+++ zfs-0.6.3/module/zfs/zfs_vfsops.c 2015-04-19 14:14:13.503040887 +0200
19@@ -67,6 +67,7 @@
20 #include <sys/spa_boot.h>
21 #include <sys/zpl.h>
22 #include "zfs_comutil.h"
23+#include "linux/version.h"
24
25
26 /*ARGSUSED*/
27@@ -1241,7 +1241,11 @@
28 zsb->z_bdi.ra_pages = 0;
29 sb->s_bdi = &zsb->z_bdi;
30
31+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
32+ error = -bdi_setup_and_register(&zsb->z_bdi, "zfs");
33+#else
34 error = -bdi_setup_and_register(&zsb->z_bdi, "zfs", BDI_CAP_MAP_COPY);
35+#endif
36 if (error)
37 goto out;
38 #endif /* HAVE_BDI */
This page took 0.023964 seconds and 4 git commands to generate.