On 11/16/24 6:44 AM, Joanne Koong wrote: > @@ -1838,7 +1748,7 @@ static void fuse_writepage_finish_stat(struct inode *inode, struct folio *folio) > struct backing_dev_info *bdi = inode_to_bdi(inode); > > dec_wb_stat(&bdi->wb, WB_WRITEBACK); > - node_stat_sub_folio(folio, NR_WRITEBACK_TEMP); > + node_stat_sub_folio(folio, NR_WRITEBACK); Now fuse_writepage_finish_stat() has only one caller and we could make it embedded into its only caller. > static void fuse_writepage_args_page_fill(struct fuse_writepage_args *wpa, struct folio *folio, > - struct folio *tmp_folio, uint32_t folio_index) > + uint32_t folio_index) > { > struct inode *inode = folio->mapping->host; > struct fuse_args_pages *ap = &wpa->ia.ap; > > - folio_copy(tmp_folio, folio); > - > - ap->folios[folio_index] = tmp_folio; > + ap->folios[folio_index] = folio; > ap->descs[folio_index].offset = 0; > ap->descs[folio_index].length = PAGE_SIZE; > > inc_wb_stat(&inode_to_bdi(inode)->wb, WB_WRITEBACK); > - node_stat_add_folio(tmp_folio, NR_WRITEBACK_TEMP); > + node_stat_add_folio(folio, NR_WRITEBACK); This inc NR_WRITEBACK counter along with the corresponding dec NR_WRITEBACK counter in fuse_writepage_finish_stat() seems unnecessary, as folio_start_writeback() will increase the NR_WRITEBACK counter, while folio_end_writeback() will decrease the NR_WRITEBACK counter. -- Thanks, Jingbo