summaryrefslogtreecommitdiffstats
path: root/fs/udf/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/udf/inode.c')
-rw-r--r--fs/udf/inode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 5b184c7..28984ba 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -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;
}
OpenPOWER on IntegriCloud