* [PATCH] mm/filemap.c: Use existing variable
@ 2018-09-19 16:50 haiqing.shq
0 siblings, 0 replies; only message in thread
From: haiqing.shq @ 2018-09-19 16:50 UTC (permalink / raw)
To: akpm; +Cc: jack, mgorman, ak, yang.s, linux-kernel, linux-mm, haiqing.shq
From: "haiqing.shq" <leviathan0992@gmail.com>
Use the variable write_len instead of ov_iter_count(from).
Signed-off-by: haiqing.shq <leviathan0992@gmail.com>
---
mm/filemap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/filemap.c b/mm/filemap.c
index 52517f2..4a699ef 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -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,
--
1.8.3.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-09-19 16:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-19 16:50 [PATCH] mm/filemap.c: Use existing variable haiqing.shq
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).