linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "haiqing.shq" <leviathan0992@gmail.com>
To: akpm@linux-foundation.org
Cc: jack@suse.cz, mgorman@techsingularity.net, ak@linux.intel.com,
	yang.s@alibaba-inc.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, "haiqing.shq" <leviathan0992@gmail.com>
Subject: [PATCH] mm/filemap.c: Use existing variable
Date: Wed, 19 Sep 2018 16:50:55 +0000	[thread overview]
Message-ID: <1537375855-2088-1-git-send-email-leviathan0992@gmail.com> (raw)

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


                 reply	other threads:[~2018-09-19 16:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1537375855-2088-1-git-send-email-leviathan0992@gmail.com \
    --to=leviathan0992@gmail.com \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=yang.s@alibaba-inc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).