diff options
Diffstat (limited to 'fs/reiserfs')
-rw-r--r-- | fs/reiserfs/inode.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index bc8b8009897d..17bf4c41a509 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -3083,15 +3083,14 @@ static int reiserfs_releasepage(struct page *page, gfp_t unused_gfp_flags) | |||
3083 | /* We thank Mingming Cao for helping us understand in great detail what | 3083 | /* We thank Mingming Cao for helping us understand in great detail what |
3084 | to do in this section of the code. */ | 3084 | to do in this section of the code. */ |
3085 | static ssize_t reiserfs_direct_IO(int rw, struct kiocb *iocb, | 3085 | static ssize_t reiserfs_direct_IO(int rw, struct kiocb *iocb, |
3086 | const struct iovec *iov, loff_t offset, | 3086 | struct iov_iter *iter, loff_t offset) |
3087 | unsigned long nr_segs) | ||
3088 | { | 3087 | { |
3089 | struct file *file = iocb->ki_filp; | 3088 | struct file *file = iocb->ki_filp; |
3090 | struct inode *inode = file->f_mapping->host; | 3089 | struct inode *inode = file->f_mapping->host; |
3091 | ssize_t ret; | 3090 | ssize_t ret; |
3092 | 3091 | ||
3093 | ret = blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs, | 3092 | ret = blockdev_direct_IO(rw, iocb, inode, iter->iov, offset, |
3094 | reiserfs_get_blocks_direct_io); | 3093 | iter->nr_segs, reiserfs_get_blocks_direct_io); |
3095 | 3094 | ||
3096 | /* | 3095 | /* |
3097 | * In case of error extending write may have instantiated a few | 3096 | * In case of error extending write may have instantiated a few |
@@ -3099,7 +3098,7 @@ static ssize_t reiserfs_direct_IO(int rw, struct kiocb *iocb, | |||
3099 | */ | 3098 | */ |
3100 | if (unlikely((rw & WRITE) && ret < 0)) { | 3099 | if (unlikely((rw & WRITE) && ret < 0)) { |
3101 | loff_t isize = i_size_read(inode); | 3100 | loff_t isize = i_size_read(inode); |
3102 | loff_t end = offset + iov_length(iov, nr_segs); | 3101 | loff_t end = offset + iov_length(iter->iov, iter->nr_segs); |
3103 | 3102 | ||
3104 | if ((end > isize) && inode_newsize_ok(inode, isize) == 0) { | 3103 | if ((end > isize) && inode_newsize_ok(inode, isize) == 0) { |
3105 | truncate_setsize(inode, isize); | 3104 | truncate_setsize(inode, isize); |