mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
pass iov_iter to ->direct_IO()
unmodified, for now Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
cb66a7a1f1
commit
d8d3d94b80
30 changed files with 117 additions and 126 deletions
|
|
@ -298,8 +298,8 @@ static int nilfs_write_end(struct file *file, struct address_space *mapping,
|
|||
}
|
||||
|
||||
static ssize_t
|
||||
nilfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
|
||||
loff_t offset, unsigned long nr_segs)
|
||||
nilfs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter,
|
||||
loff_t offset)
|
||||
{
|
||||
struct file *file = iocb->ki_filp;
|
||||
struct address_space *mapping = file->f_mapping;
|
||||
|
|
@ -310,8 +310,8 @@ nilfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
|
|||
return 0;
|
||||
|
||||
/* Needs synchronization with the cleaner */
|
||||
size = blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs,
|
||||
nilfs_get_block);
|
||||
size = blockdev_direct_IO(rw, iocb, inode, iter->iov, offset,
|
||||
iter->nr_segs, nilfs_get_block);
|
||||
|
||||
/*
|
||||
* In case of error extending write may have instantiated a few
|
||||
|
|
@ -319,7 +319,7 @@ nilfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
|
|||
*/
|
||||
if (unlikely((rw & WRITE) && size < 0)) {
|
||||
loff_t isize = i_size_read(inode);
|
||||
loff_t end = offset + iov_length(iov, nr_segs);
|
||||
loff_t end = offset + iov_length(iter->iov, iter->nr_segs);
|
||||
|
||||
if (end > isize)
|
||||
nilfs_write_failed(mapping, end);
|
||||
|
|
|
|||
Loading…
Reference in a new issue