mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
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>
This commit is contained in:
parent
16b1f05d7f
commit
a6cbcd4a4a
18 changed files with 32 additions and 30 deletions
|
@ -223,12 +223,13 @@ static ssize_t udf_direct_IO(int rw, struct kiocb *iocb,
|
|||
struct file *file = iocb->ki_filp;
|
||||
struct address_space *mapping = file->f_mapping;
|
||||
struct inode *inode = mapping->host;
|
||||
size_t count = iov_iter_count(iter);
|
||||
ssize_t ret;
|
||||
|
||||
ret = blockdev_direct_IO(rw, iocb, inode, iter->iov, offset, iter->nr_segs,
|
||||
udf_get_block);
|
||||
if (unlikely(ret < 0 && (rw & WRITE)))
|
||||
udf_write_failed(mapping, offset + iov_length(iter->iov, iter->nr_segs));
|
||||
udf_write_failed(mapping, offset + count);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue