diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-03-04 22:38:00 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-05-06 17:32:45 -0400 |
commit | a6cbcd4a4a85e2fdb0b3344b88df2e8b3d526b9e (patch) | |
tree | c0f054759a0b9c26881109968ad018fe759af458 /fs/ext2 | |
parent | 16b1f05d7f5ab4ce570963aca5f3b2b5d21822fa (diff) |
get rid of pointless iov_length() in ->direct_IO()
all callers have iov_length(iter->iov, iter->nr_segs) == iov_iter_count(iter)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ext2')
-rw-r--r-- | fs/ext2/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index 47fbe760a7f8..116e809aa7cb 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c | |||
@@ -856,13 +856,13 @@ ext2_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter, | |||
856 | struct file *file = iocb->ki_filp; | 856 | struct file *file = iocb->ki_filp; |
857 | struct address_space *mapping = file->f_mapping; | 857 | struct address_space *mapping = file->f_mapping; |
858 | struct inode *inode = mapping->host; | 858 | struct inode *inode = mapping->host; |
859 | size_t count = iov_iter_count(iter); | ||
859 | ssize_t ret; | 860 | ssize_t ret; |
860 | 861 | ||
861 | ret = blockdev_direct_IO(rw, iocb, inode, iter->iov, offset, | 862 | ret = blockdev_direct_IO(rw, iocb, inode, iter->iov, offset, |
862 | iter->nr_segs, ext2_get_block); | 863 | iter->nr_segs, ext2_get_block); |
863 | if (ret < 0 && (rw & WRITE)) | 864 | if (ret < 0 && (rw & WRITE)) |
864 | ext2_write_failed(mapping, offset + | 865 | ext2_write_failed(mapping, offset + count); |
865 | iov_length(iter->iov, iter->nr_segs)); | ||
866 | return ret; | 866 | return ret; |
867 | } | 867 | } |
868 | 868 | ||