From: David Hildenbrand <david@redhat.com>
To: Kairui Song <kasong@tencent.com>, linux-mm@kvack.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Matthew Wilcox <willy@infradead.org>,
Hugh Dickins <hughd@google.com>, Chris Li <chrisl@kernel.org>,
Yosry Ahmed <yosryahmed@google.com>,
"Huang, Ying" <ying.huang@linux.alibaba.com>,
Nhat Pham <nphamcs@gmail.com>,
Johannes Weiner <hannes@cmpxchg.org>,
linux-kernel@vger.kernel.org, Miklos Szeredi <miklos@szeredi.hu>,
Joanne Koong <joannelkoong@gmail.com>,
Josef Bacik <josef@toxicpanda.com>,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v3 1/6] fuse: drop usage of folio_index
Date: Wed, 30 Apr 2025 23:08:10 +0200 [thread overview]
Message-ID: <5e6cd2c8-b0d1-436a-96e7-b8cb7f6d75cc@redhat.com> (raw)
In-Reply-To: <20250430181052.55698-2-ryncsn@gmail.com>
On 30.04.25 20:10, Kairui Song wrote:
> From: Kairui Song <kasong@tencent.com>
>
> folio_index is only needed for mixed usage of page cache and swap
> cache, for pure page cache usage, the caller can just use
> folio->index instead.
>
> It can't be a swap cache folio here. Swap mapping may only call into fs
> through `swap_rw` but fuse does not use that method for SWAP.
>
> Signed-off-by: Kairui Song <kasong@tencent.com>
> Cc: Miklos Szeredi <miklos@szeredi.hu>
> Cc: Joanne Koong <joannelkoong@gmail.com>
> Cc: Josef Bacik <josef@toxicpanda.com>
> Cc: linux-fsdevel@vger.kernel.org
> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> ---
> fs/fuse/file.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/fuse/file.c b/fs/fuse/file.c
> index 754378dd9f71..6f19a4daa559 100644
> --- a/fs/fuse/file.c
> +++ b/fs/fuse/file.c
> @@ -487,7 +487,7 @@ static inline bool fuse_folio_is_writeback(struct inode *inode,
> struct folio *folio)
> {
> pgoff_t last = folio_next_index(folio) - 1;
> - return fuse_range_is_writeback(inode, folio_index(folio), last);
> + return fuse_range_is_writeback(inode, folio->index, last);
> }
>
> static void fuse_wait_on_folio_writeback(struct inode *inode,
> @@ -2349,7 +2349,7 @@ static bool fuse_writepage_need_send(struct fuse_conn *fc, struct folio *folio,
> return true;
>
> /* Discontinuity */
> - if (data->orig_folios[ap->num_folios - 1]->index + 1 != folio_index(folio))
> + if (data->orig_folios[ap->num_folios - 1]->index + 1 != folio->index)
> return true;
>
> /* Need to grow the pages array? If so, did the expansion fail? */
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Cheers,
David / dhildenb
prev parent reply other threads:[~2025-04-30 21:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250430181052.55698-1-ryncsn@gmail.com>
2025-04-30 18:10 ` [PATCH v3 1/6] fuse: drop usage of folio_index Kairui Song
2025-04-30 21:08 ` David Hildenbrand [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=5e6cd2c8-b0d1-436a-96e7-b8cb7f6d75cc@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=chrisl@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=joannelkoong@gmail.com \
--cc=josef@toxicpanda.com \
--cc=kasong@tencent.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=miklos@szeredi.hu \
--cc=nphamcs@gmail.com \
--cc=willy@infradead.org \
--cc=ying.huang@linux.alibaba.com \
--cc=yosryahmed@google.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).