Re: [bug report] page cache: Convert filemap_range_has_page to XArray

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

 



On Tue, Jun 19, 2018 at 05:47:05PM +0300, Dan Carpenter wrote:
>    455  bool filemap_range_has_page(struct address_space *mapping,
>    456                             loff_t start_byte, loff_t end_byte)
>    457  {
>    458          struct page *page;
>    459          XA_STATE(xas, &mapping->i_pages, start_byte >> PAGE_SHIFT);
>    460          pgoff_t max = end_byte >> PAGE_SHIFT;
>    461  
>    462          if (end_byte < start_byte)
>    463                  return false;
>    464  
>    465          rcu_read_lock();
>    466          do {
>    467                  page = xas_find(&xas, max);
>    468                  if (xas_retry(&xas, page))
>    469                          continue;
>                                 ^^^^^^^^
>    470                  /* Shadow entries don't count */
>    471                  if (xa_is_value(page))
>    472                          continue;
>                                 ^^^^^^^^
> This is the same as a break because it's a while(0) loop.

Good catch.  Fix pushed.




[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