Skip to content
Snippets Groups Projects
Commit 41343168 authored by Mike Lothian's avatar Mike Lothian
Browse files

Add support for Linux 4.7

parent a8d79fc2
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -1670,9 +1670,11 @@ static ssize_t exfat_direct_IO(int rw, struct kiocb *iocb,
#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
static ssize_t exfat_direct_IO(int rw, struct kiocb *iocb,
struct iov_iter *iter, loff_t offset)
#else /* >= 4.1.x */
#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
static ssize_t exfat_direct_IO(struct kiocb *iocb,
struct iov_iter *iter, loff_t offset)
#else /* >= 4.7.x */
static ssize_t exfat_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
#endif
{
struct inode *inode = iocb->ki_filp->f_mapping->host;
Loading
Loading
@@ -1694,12 +1696,16 @@ static ssize_t exfat_direct_IO(struct kiocb *iocb,
#else
if (EXFAT_I(inode)->mmu_private < (offset + iov_length(iov, nr_segs)))
#endif
#else
#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
if (EXFAT_I(inode)->mmu_private < (offset + iov_iter_count(iter)))
#else
if (EXFAT_I(inode)->mmu_private < iov_iter_count(iter))
#endif
return 0;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
ret = blockdev_direct_IO(iocb, inode, iter, exfat_get_block);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
ret = blockdev_direct_IO(iocb, inode, iter,
offset, exfat_get_block);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)
Loading
Loading
@@ -1718,7 +1724,10 @@ static ssize_t exfat_direct_IO(struct kiocb *iocb,
offset, nr_segs, exfat_get_block, NULL);
#endif
 
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
if ((ret < 0) && (rw & WRITE))
exfat_write_failed(mapping, iov_iter_count(iter));
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)
if ((ret < 0) && (rw & WRITE))
exfat_write_failed(mapping, offset+iov_iter_count(iter));
#elif LINUX_VERSION_CODE > KERNEL_VERSION(2,6,34)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment