From: Matthew Wilcox <willy@infradead.org>
To: zhengbin <zhengbin13@huawei.com>
Cc: Goldwyn Rodrigues <rgoldwyn@suse.com>,
Christoph Hellwig <hch@lst.de>, Jan Kara <jack@suse.cz>,
Jens Axboe <axboe@kernel.dk>,
akpm@linux-foundation.org, darrick.wong@oracle.com,
amir73il@gmail.com, david@fromorbit.com, hannes@cmpxchg.org,
jrdr.linux@gmail.com, hughd@google.com, linux-mm@kvack.org,
houtao1@huawei.com, yi.zhang@huawei.com
Subject: Re: [PATCH] mm/filemap: pass inclusive 'end_byte' parameter to filemap_range_has_page
Date: Mon, 28 Jan 2019 12:18:05 -0800 [thread overview]
Message-ID: <20190128201805.GA31437@bombadil.infradead.org> (raw)
In-Reply-To: <1548678679-18122-1-git-send-email-zhengbin13@huawei.com>
On Mon, Jan 28, 2019 at 08:31:19PM +0800, zhengbin wrote:
> The 'end_byte' parameter of filemap_range_has_page is required to be
> inclusive, so follow the rule.
Reviewed-by: Matthew Wilcox <willy@infradead.org>
Fixes: 6be96d3ad34a ("fs: return if direct I/O will trigger writeback")
Adding the people in the sign-off chain to the Cc.
> Signed-off-by: zhengbin <zhengbin13@huawei.com>
> ---
> mm/filemap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 9f5e323..a236bf3 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -3081,7 +3081,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 + write_len))
> + pos + write_len - 1))
> return -EAGAIN;
> } else {
> written = filemap_write_and_wait_range(mapping, pos,
> --
> 2.7.4
>
next prev parent reply other threads:[~2019-01-28 20:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-28 12:31 [PATCH] mm/filemap: pass inclusive 'end_byte' parameter to filemap_range_has_page zhengbin
2019-01-28 12:31 ` zhengbin
2019-01-28 20:18 ` Matthew Wilcox [this message]
2019-02-01 7:43 ` Christoph Hellwig
2019-02-01 15:14 ` Jens Axboe
2019-02-01 19:32 ` Matthew Wilcox
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=20190128201805.GA31437@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=amir73il@gmail.com \
--cc=axboe@kernel.dk \
--cc=darrick.wong@oracle.com \
--cc=david@fromorbit.com \
--cc=hannes@cmpxchg.org \
--cc=hch@lst.de \
--cc=houtao1@huawei.com \
--cc=hughd@google.com \
--cc=jack@suse.cz \
--cc=jrdr.linux@gmail.com \
--cc=linux-mm@kvack.org \
--cc=rgoldwyn@suse.com \
--cc=yi.zhang@huawei.com \
--cc=zhengbin13@huawei.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).