lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5e6cd2c8-b0d1-436a-96e7-b8cb7f6d75cc@redhat.com>
Date: Wed, 30 Apr 2025 23:08:10 +0200
From: David Hildenbrand <david@...hat.com>
To: Kairui Song <kasong@...cent.com>, linux-mm@...ck.org
Cc: Andrew Morton <akpm@...ux-foundation.org>,
 Matthew Wilcox <willy@...radead.org>, Hugh Dickins <hughd@...gle.com>,
 Chris Li <chrisl@...nel.org>, Yosry Ahmed <yosryahmed@...gle.com>,
 "Huang, Ying" <ying.huang@...ux.alibaba.com>, Nhat Pham <nphamcs@...il.com>,
 Johannes Weiner <hannes@...xchg.org>, linux-kernel@...r.kernel.org,
 Miklos Szeredi <miklos@...redi.hu>, Joanne Koong <joannelkoong@...il.com>,
 Josef Bacik <josef@...icpanda.com>, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH v3 1/6] fuse: drop usage of folio_index

On 30.04.25 20:10, Kairui Song wrote:
> From: Kairui Song <kasong@...cent.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@...cent.com>
> Cc: Miklos Szeredi <miklos@...redi.hu>
> Cc: Joanne Koong <joannelkoong@...il.com>
> Cc: Josef Bacik <josef@...icpanda.com>
> Cc: linux-fsdevel@...r.kernel.org
> Reviewed-by: Matthew Wilcox (Oracle) <willy@...radead.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@...hat.com>

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ