Re: [PATCH] mm/filemap: pass inclusive 'end_byte' parameter to filemap_range_has_page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
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@xxxxxxxxxx>
> ---
>  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
> 




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux