linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-mm@kvack.org
Subject: Re: [bug report] page cache: Convert filemap_range_has_page to XArray
Date: Tue, 19 Jun 2018 08:48:44 -0700	[thread overview]
Message-ID: <20180619154844.GD1438@bombadil.infradead.org> (raw)
In-Reply-To: <20180619144705.oqjmli6l7f7j2mgx@kili.mountain>

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.

      reply	other threads:[~2018-06-19 15:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-19 14:47 Dan Carpenter
2018-06-19 15:48 ` Matthew Wilcox [this message]

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=20180619154844.GD1438@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-mm@kvack.org \
    /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