Skip to contentSkip to conversation

mm/filemap.c: Use existing variable

PATCH New haiqing.shq 1 participant 1 message Sep 19, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm/filemap.c: Use existing variable

From: "haiqing.shq" <[email protected]>

Use the variable write_len instead of ov_iter_count(from).

---
 mm/filemap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/filemap.c +1 -1
index 52517f2..4a699ef 100644
@@ -3012,7 +3012,7 @@ int pagecache_write_end(struct file *file, struct address_space *mapping,
 	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,
Signature · 1 line
1.8.3.1