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