--- /dev/null
+--- zfs-0.6.3/module/zfs/zpl_file.c~ 2014-06-12 22:58:09.000000000 +0200
++++ zfs-0.6.3/module/zfs/zpl_file.c 2015-03-30 21:34:49.848900638 +0200
+@@ -23,6 +23,7 @@
+ */
+
+
++#include <linux/version.h>
+ #include <sys/dmu_objset.h>
+ #include <sys/zfs_vfsops.h>
+ #include <sys/zfs_vnops.h>
+@@ -527,7 +528,11 @@
+ static int
+ zpl_ioctl_getflags(struct file *filp, void __user *arg)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
++ struct inode *ip = filp->f_path.dentry->d_inode;
++#else
+ struct inode *ip = filp->f_dentry->d_inode;
++#endif
+ unsigned int ioctl_flags = 0;
+ uint64_t zfs_flags = ITOZ(ip)->z_pflags;
+ int error;
+@@ -563,7 +568,11 @@
+ static int
+ zpl_ioctl_setflags(struct file *filp, void __user *arg)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
++ struct inode *ip = filp->f_path.dentry->d_inode;
++#else
+ struct inode *ip = filp->f_dentry->d_inode;
++#endif
+ uint64_t zfs_flags = ITOZ(ip)->z_pflags;
+ unsigned int ioctl_flags;
+ cred_t *cr = CRED();
+--- zfs-0.6.3/module/zpios/pios.c~ 2014-06-12 22:58:09.000000000 +0200
++++ zfs-0.6.3/module/zpios/pios.c 2015-03-30 21:38:27.752243085 +0200
+@@ -36,6 +36,7 @@
+ #include <sys/txg.h>
+ #include <sys/dsl_destroy.h>
+ #include <linux/cdev.h>
++#include <linux/version.h>
+ #include "zpios-internal.h"
+
+
+@@ -1143,7 +1144,11 @@
+ static long
+ zpios_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
++ unsigned int minor = iminor(file->f_path.dentry->d_inode);
++#else
+ unsigned int minor = iminor(file->f_dentry->d_inode);
++#endif
+ int rc = 0;
+
+ /* Ignore tty ioctls */
+@@ -1187,7 +1192,11 @@
+ zpios_write(struct file *file, const char __user *buf,
+ size_t count, loff_t *ppos)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
++ unsigned int minor = iminor(file->f_path.dentry->d_inode);
++#else
+ unsigned int minor = iminor(file->f_dentry->d_inode);
++#endif
+ zpios_info_t *info = (zpios_info_t *)file->private_data;
+ int rc = 0;
+
+@@ -1224,7 +1233,11 @@
+ static ssize_t
+ zpios_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
++ unsigned int minor = iminor(file->f_path.dentry->d_inode);
++#else
+ unsigned int minor = iminor(file->f_dentry->d_inode);
++#endif
+ zpios_info_t *info = (zpios_info_t *)file->private_data;
+ int rc = 0;
+
+@@ -1258,7 +1271,11 @@
+
+ static loff_t zpios_seek(struct file *file, loff_t offset, int origin)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
++ unsigned int minor = iminor(file->f_path.dentry->d_inode);
++#else
+ unsigned int minor = iminor(file->f_dentry->d_inode);
++#endif
+ zpios_info_t *info = (zpios_info_t *)file->private_data;
+ int rc = -EINVAL;
+