mm/filemap.c: Use existing variable

Use the variable write_len instead of ov_iter_count(from).

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: haiqing.shq <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
haiqing.shq authored and Linus Torvalds committed 2018-10-26 16:26:33 -07:00
1 parent cb4922496a
commit 3cb7b121ff
1 file changed
+1 -1
+1 -1
View File
@@ -3027,7 +3027,7 @@ generic_file_direct_write(struct kiocb *iocb, struct iov_iter *from)
if (iocb->ki_flags & IOCB_NOWAIT) {
/* If there are pages to writeback, return */
if (filemap_range_has_page(inode->i_mapping, pos,
pos + iov_iter_count(from)))
pos + write_len))
return -EAGAIN;
} else {
written = filemap_write_and_wait_range(mapping, pos,