Skip to content

Commit

Permalink
iov_iter_count is still not supported in main line.
Browse files Browse the repository at this point in the history
  • Loading branch information
dorimanx committed Mar 6, 2014
1 parent 1691cda commit b0abdd6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions exfat_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1404,7 +1404,7 @@ static int exfat_write_end(struct file *file, struct address_space *mapping,
return err;
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
static ssize_t exfat_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter,
loff_t offset)
#else
Expand All @@ -1420,15 +1420,15 @@ static ssize_t exfat_direct_IO(int rw, struct kiocb *iocb,
ssize_t ret;

if (rw == WRITE) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
if (EXFAT_I(inode)->mmu_private < (offset + iov_iter_count(iter)))
#else
if (EXFAT_I(inode)->mmu_private < (offset + iov_length(iov, nr_segs)))
#endif
return 0;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,00)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
ret = blockdev_direct_IO(rw, iocb, inode, iter,
offset, exfat_get_block);
#else
Expand All @@ -1442,7 +1442,7 @@ static ssize_t exfat_direct_IO(int rw, struct kiocb *iocb,

#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,34)
if ((ret < 0) && (rw & WRITE))
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
exfat_write_failed(mapping, offset+iov_iter_count(iter));
#else
exfat_write_failed(mapping, offset+iov_length(iov, nr_segs));
Expand Down

0 comments on commit b0abdd6

Please sign in to comment.