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 Fri, Feb 01, 2019 at 08:43:59AM +0100, Christoph Hellwig wrote:
> On Mon, Jan 28, 2019 at 12:18:05PM -0800, Matthew Wilcox wrote:
> > 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.
> 
> This looks correct to me:
> 
> Acked-by: Christoph Hellwig <hch@xxxxxx>
> 
> I wish we'd kill these stupid range calling conventions, though - 
> offset + len is a lot more intuitive, and we already use it very
> widely all over the kernel.

It has its own problems though; you have to check that offset + len -
1 doesn't wrap past zero.  Really, it's the transition from (offset,
len) to (min, max) that needs to be avoided as much as possible within
a subsystem.




[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