]> git.pld-linux.org Git - packages/zfs.git/blame - linux-3.19.patch
- fix building with linux 4.0
[packages/zfs.git] / linux-3.19.patch
CommitLineData
00012a30
JR
1--- zfs-0.6.3/module/zfs/zpl_file.c~ 2014-06-12 22:58:09.000000000 +0200
2+++ zfs-0.6.3/module/zfs/zpl_file.c 2015-03-30 21:34:49.848900638 +0200
3@@ -23,6 +23,7 @@
4 */
5
6
7+#include <linux/version.h>
8 #include <sys/dmu_objset.h>
9 #include <sys/zfs_vfsops.h>
10 #include <sys/zfs_vnops.h>
11@@ -527,7 +528,11 @@
12 static int
13 zpl_ioctl_getflags(struct file *filp, void __user *arg)
14 {
15+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
16+ struct inode *ip = filp->f_path.dentry->d_inode;
17+#else
18 struct inode *ip = filp->f_dentry->d_inode;
19+#endif
20 unsigned int ioctl_flags = 0;
21 uint64_t zfs_flags = ITOZ(ip)->z_pflags;
22 int error;
23@@ -563,7 +568,11 @@
24 static int
25 zpl_ioctl_setflags(struct file *filp, void __user *arg)
26 {
27+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
28+ struct inode *ip = filp->f_path.dentry->d_inode;
29+#else
30 struct inode *ip = filp->f_dentry->d_inode;
31+#endif
32 uint64_t zfs_flags = ITOZ(ip)->z_pflags;
33 unsigned int ioctl_flags;
34 cred_t *cr = CRED();
35--- zfs-0.6.3/module/zpios/pios.c~ 2014-06-12 22:58:09.000000000 +0200
36+++ zfs-0.6.3/module/zpios/pios.c 2015-03-30 21:38:27.752243085 +0200
37@@ -36,6 +36,7 @@
38 #include <sys/txg.h>
39 #include <sys/dsl_destroy.h>
40 #include <linux/cdev.h>
41+#include <linux/version.h>
42 #include "zpios-internal.h"
43
44
45@@ -1143,7 +1144,11 @@
46 static long
47 zpios_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
48 {
49+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
50+ unsigned int minor = iminor(file->f_path.dentry->d_inode);
51+#else
52 unsigned int minor = iminor(file->f_dentry->d_inode);
53+#endif
54 int rc = 0;
55
56 /* Ignore tty ioctls */
57@@ -1187,7 +1192,11 @@
58 zpios_write(struct file *file, const char __user *buf,
59 size_t count, loff_t *ppos)
60 {
61+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
62+ unsigned int minor = iminor(file->f_path.dentry->d_inode);
63+#else
64 unsigned int minor = iminor(file->f_dentry->d_inode);
65+#endif
66 zpios_info_t *info = (zpios_info_t *)file->private_data;
67 int rc = 0;
68
69@@ -1224,7 +1233,11 @@
70 static ssize_t
71 zpios_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
72 {
73+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
74+ unsigned int minor = iminor(file->f_path.dentry->d_inode);
75+#else
76 unsigned int minor = iminor(file->f_dentry->d_inode);
77+#endif
78 zpios_info_t *info = (zpios_info_t *)file->private_data;
79 int rc = 0;
80
81@@ -1258,7 +1271,11 @@
82
83 static loff_t zpios_seek(struct file *file, loff_t offset, int origin)
84 {
85+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
86+ unsigned int minor = iminor(file->f_path.dentry->d_inode);
87+#else
88 unsigned int minor = iminor(file->f_dentry->d_inode);
89+#endif
90 zpios_info_t *info = (zpios_info_t *)file->private_data;
91 int rc = -EINVAL;
92
This page took 0.041126 seconds and 4 git commands to generate.