Re: [PATCH v3 9/9] fuse: refactor out shared logic in fuse_writepages_fill() and fuse_writepage_locked()

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

 



On Fri, Aug 23, 2024 at 09:27:30AM -0700, Joanne Koong wrote:
> This change refactors the shared logic in fuse_writepages_fill() and
> fuse_writepages_locked() into two separate helper functions,
> fuse_writepage_args_page_fill() and fuse_writepage_args_setup().
> 
> No functional changes added.
> 
> Signed-off-by: Joanne Koong <joannelkoong@xxxxxxxxx>
> ---
>  fs/fuse/file.c | 99 ++++++++++++++++++++++++++++----------------------
>  1 file changed, 55 insertions(+), 44 deletions(-)
> 
> diff --git a/fs/fuse/file.c b/fs/fuse/file.c
> index 2348baf2521c..88f872c02349 100644
> --- a/fs/fuse/file.c
> +++ b/fs/fuse/file.c
> @@ -2047,50 +2047,77 @@ static void fuse_writepage_add_to_bucket(struct fuse_conn *fc,
>  	rcu_read_unlock();
>  }
>  
> +static void fuse_writepage_args_page_fill(struct fuse_writepage_args *wpa, struct folio *folio,
> +					  struct folio *tmp_folio, uint32_t page_index)
> +{
> +	struct inode *inode = folio->mapping->host;
> +	struct fuse_args_pages *ap = &wpa->ia.ap;
> +
> +	folio_copy(tmp_folio, folio);
> +
> +	ap->pages[page_index] = &tmp_folio->page;
> +	ap->descs[page_index].offset = 0;
> +	ap->descs[page_index].length = PAGE_SIZE;
> +
> +	inc_wb_stat(&inode_to_bdi(inode)->wb, WB_WRITEBACK);
> +	inc_node_page_state(&tmp_folio->page, NR_WRITEBACK_TEMP);

Same comment here as before.  Thanks,

Josef




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux