diff options
Diffstat (limited to 'fs/jfs/inode.c')
-rw-r--r-- | fs/jfs/inode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index 6f8fe72c2a7a..bd3df1ca3c9b 100644 --- a/fs/jfs/inode.c +++ b/fs/jfs/inode.c | |||
@@ -331,15 +331,15 @@ static sector_t jfs_bmap(struct address_space *mapping, sector_t block) | |||
331 | } | 331 | } |
332 | 332 | ||
333 | static ssize_t jfs_direct_IO(int rw, struct kiocb *iocb, | 333 | static ssize_t jfs_direct_IO(int rw, struct kiocb *iocb, |
334 | const struct iovec *iov, loff_t offset, unsigned long nr_segs) | 334 | struct iov_iter *iter, loff_t offset) |
335 | { | 335 | { |
336 | struct file *file = iocb->ki_filp; | 336 | struct file *file = iocb->ki_filp; |
337 | struct address_space *mapping = file->f_mapping; | 337 | struct address_space *mapping = file->f_mapping; |
338 | struct inode *inode = file->f_mapping->host; | 338 | struct inode *inode = file->f_mapping->host; |
339 | size_t count = iov_iter_count(iter); | ||
339 | ssize_t ret; | 340 | ssize_t ret; |
340 | 341 | ||
341 | ret = blockdev_direct_IO(rw, iocb, inode, iov, offset, nr_segs, | 342 | ret = blockdev_direct_IO(rw, iocb, inode, iter, offset, jfs_get_block); |
342 | jfs_get_block); | ||
343 | 343 | ||
344 | /* | 344 | /* |
345 | * In case of error extending write may have instantiated a few | 345 | * In case of error extending write may have instantiated a few |
@@ -347,7 +347,7 @@ static ssize_t jfs_direct_IO(int rw, struct kiocb *iocb, | |||
347 | */ | 347 | */ |
348 | if (unlikely((rw & WRITE) && ret < 0)) { | 348 | if (unlikely((rw & WRITE) && ret < 0)) { |
349 | loff_t isize = i_size_read(inode); | 349 | loff_t isize = i_size_read(inode); |
350 | loff_t end = offset + iov_length(iov, nr_segs); | 350 | loff_t end = offset + count; |
351 | 351 | ||
352 | if (end > isize) | 352 | if (end > isize) |
353 | jfs_write_failed(mapping, end); | 353 | jfs_write_failed(mapping, end); |