On Thu, May 08, 2025 at 02:25:00PM +0100, Matthew Wilcox wrote: > This got me to look at why we need to keep wbc in __shmem_writeback(). > We only have it because folio_redirty_for_writepage() needs it. And > folio_redirty_for_writepage() only needs it because it updates > pages_skipped. in linux-next you also changed it to use writeback_iter, which needs the wbc as well. That probably as an improvement compared to the previous version, but overall it still feels odd. > I'm not quite sure if we can simply call filemap_dirty_folio() here > or whether mapping_can_writeback() is true for shmem and we need to > do all the other things -- in which case we could just change that one > line to shmem doesn't set up a bdi, so it should not be true.