On Fri, May 27, 2022 at 04:50:26PM +0100, Matthew Wilcox (Oracle) wrote: > read_mapping_folio() returns an ERR_PTR if the folio is not > uptodate, so this check is simply dead code. Looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx> > /* Read a page's worth of file data into the page cache. */ > static struct folio *vfs_dedupe_get_folio(struct file *file, loff_t pos) > { > + return read_mapping_folio(file->f_mapping, pos >> PAGE_SHIFT, file); > } But I wonder if this isn't useful enough to go to filemap.c in one form or another.