diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-03-05 04:14:00 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-05-06 23:32:45 +0200 |
commit | 16b1f05d7f5ab4ce570963aca5f3b2b5d21822fa (patch) | |
tree | c3cb15bc1843274bc2d70759dc9007da2a83c97e /fs/ext4/inode.c | |
parent | convert the guts of nfs_direct_IO() to iov_iter (diff) | |
download | linux-16b1f05d7f5ab4ce570963aca5f3b2b5d21822fa.tar.xz linux-16b1f05d7f5ab4ce570963aca5f3b2b5d21822fa.zip |
ext4: switch the guts of ->direct_IO() to iov_iter
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to '')
-rw-r--r-- | fs/ext4/inode.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index f51db730da39..29996c1b673e 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3085,13 +3085,12 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset, * */ static ssize_t ext4_ext_direct_IO(int rw, struct kiocb *iocb, - const struct iovec *iov, loff_t offset, - unsigned long nr_segs) + struct iov_iter *iter, loff_t offset) { struct file *file = iocb->ki_filp; struct inode *inode = file->f_mapping->host; ssize_t ret; - size_t count = iov_length(iov, nr_segs); + size_t count = iov_length(iter->iov, iter->nr_segs); int overwrite = 0; get_block_t *get_block_func = NULL; int dio_flags = 0; @@ -3100,7 +3099,7 @@ static ssize_t ext4_ext_direct_IO(int rw, struct kiocb *iocb, /* Use the old path for reads and writes beyond i_size. */ if (rw != WRITE || final_size > inode->i_size) - return ext4_ind_direct_IO(rw, iocb, iov, offset, nr_segs); + return ext4_ind_direct_IO(rw, iocb, iter, offset); BUG_ON(iocb->private == NULL); @@ -3167,8 +3166,8 @@ static ssize_t ext4_ext_direct_IO(int rw, struct kiocb *iocb, dio_flags = DIO_LOCKING; } ret = __blockdev_direct_IO(rw, iocb, inode, - inode->i_sb->s_bdev, iov, - offset, nr_segs, + inode->i_sb->s_bdev, iter->iov, + offset, iter->nr_segs, get_block_func, ext4_end_io_dio, NULL, @@ -3240,9 +3239,9 @@ static ssize_t ext4_direct_IO(int rw, struct kiocb *iocb, trace_ext4_direct_IO_enter(inode, offset, iov_length(iter->iov, iter->nr_segs), rw); if (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)) - ret = ext4_ext_direct_IO(rw, iocb, iter->iov, offset, iter->nr_segs); + ret = ext4_ext_direct_IO(rw, iocb, iter, offset); else - ret = ext4_ind_direct_IO(rw, iocb, iter->iov, offset, iter->nr_segs); + ret = ext4_ind_direct_IO(rw, iocb, iter, offset); trace_ext4_direct_IO_exit(inode, offset, iov_length(iter->iov, iter->nr_segs), rw, ret); return ret; |