aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c15
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,
3085 * 3085 *
3086 */ 3086 */
3087static ssize_t ext4_ext_direct_IO(int rw, struct kiocb *iocb, 3087static ssize_t ext4_ext_direct_IO(int rw, struct kiocb *iocb,
3088 const struct iovec *iov, loff_t offset, 3088 struct iov_iter *iter, loff_t offset)
3089 unsigned long nr_segs)
3090{ 3089{
3091 struct file *file = iocb->ki_filp; 3090 struct file *file = iocb->ki_filp;
3092 struct inode *inode = file->f_mapping->host; 3091 struct inode *inode = file->f_mapping->host;
3093 ssize_t ret; 3092 ssize_t ret;
3094 size_t count = iov_length(iov, nr_segs); 3093 size_t count = iov_length(iter->iov, iter->nr_segs);
3095 int overwrite = 0; 3094 int overwrite = 0;
3096 get_block_t *get_block_func = NULL; 3095 get_block_t *get_block_func = NULL;
3097 int dio_flags = 0; 3096 int dio_flags = 0;
@@ -3100,7 +3099,7 @@ static ssize_t ext4_ext_direct_IO(int rw, struct kiocb *iocb,
3100 3099
3101 /* Use the old path for reads and writes beyond i_size. */ 3100 /* Use the old path for reads and writes beyond i_size. */
3102 if (rw != WRITE || final_size > inode->i_size) 3101 if (rw != WRITE || final_size > inode->i_size)
3103 return ext4_ind_direct_IO(rw, iocb, iov, offset, nr_segs); 3102 return ext4_ind_direct_IO(rw, iocb, iter, offset);
3104 3103
3105 BUG_ON(iocb->private == NULL); 3104 BUG_ON(iocb->private == NULL);
3106 3105
@@ -3167,8 +3166,8 @@ static ssize_t ext4_ext_direct_IO(int rw, struct kiocb *iocb,
3167 dio_flags = DIO_LOCKING; 3166 dio_flags = DIO_LOCKING;
3168 } 3167 }
3169 ret = __blockdev_direct_IO(rw, iocb, inode, 3168 ret = __blockdev_direct_IO(rw, iocb, inode,
3170 inode->i_sb->s_bdev, iov, 3169 inode->i_sb->s_bdev, iter->iov,
3171 offset, nr_segs, 3170 offset, iter->nr_segs,
3172 get_block_func, 3171 get_block_func,
3173 ext4_end_io_dio, 3172 ext4_end_io_dio,
3174 NULL, 3173 NULL,
@@ -3240,9 +3239,9 @@ static ssize_t ext4_direct_IO(int rw, struct kiocb *iocb,
3240 3239
3241 trace_ext4_direct_IO_enter(inode, offset, iov_length(iter->iov, iter->nr_segs), rw); 3240 trace_ext4_direct_IO_enter(inode, offset, iov_length(iter->iov, iter->nr_segs), rw);
3242 if (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)) 3241 if (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))
3243 ret = ext4_ext_direct_IO(rw, iocb, iter->iov, offset, iter->nr_segs); 3242 ret = ext4_ext_direct_IO(rw, iocb, iter, offset);
3244 else 3243 else
3245 ret = ext4_ind_direct_IO(rw, iocb, iter->iov, offset, iter->nr_segs); 3244 ret = ext4_ind_direct_IO(rw, iocb, iter, offset);
3246 trace_ext4_direct_IO_exit(inode, offset, 3245 trace_ext4_direct_IO_exit(inode, offset,
3247 iov_length(iter->iov, iter->nr_segs), rw, ret); 3246 iov_length(iter->iov, iter->nr_segs), rw, ret);
3248 return ret; 3247 return ret;