On 5/14/25 1:13 PM, Matthew Wilcox (Oracle) wrote: > Mirror the changes to __page_get_link() by retrieving a folio from > the page cache instead of a page. Removes two hidden calls to > compound_head(). > > Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> Acked-by: Anna Schumaker <anna.schumaker@xxxxxxxxxx> > --- > fs/nfs/symlink.c | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/fs/nfs/symlink.c b/fs/nfs/symlink.c > index 1c62a5a9f51d..004a8f6c568e 100644 > --- a/fs/nfs/symlink.c > +++ b/fs/nfs/symlink.c > @@ -40,31 +40,31 @@ static const char *nfs_get_link(struct dentry *dentry, > struct inode *inode, > struct delayed_call *done) > { > - struct page *page; > + struct folio *folio; > void *err; > > if (!dentry) { > err = ERR_PTR(nfs_revalidate_mapping_rcu(inode)); > if (err) > return err; > - page = find_get_page(inode->i_mapping, 0); > - if (!page) > + folio = filemap_get_folio(inode->i_mapping, 0); > + if (IS_ERR(folio)) > return ERR_PTR(-ECHILD); > - if (!PageUptodate(page)) { > - put_page(page); > + if (!folio_test_uptodate(folio)) { > + folio_put(folio); > return ERR_PTR(-ECHILD); > } > } else { > err = ERR_PTR(nfs_revalidate_mapping(inode, inode->i_mapping)); > if (err) > return err; > - page = read_cache_page(&inode->i_data, 0, nfs_symlink_filler, > + folio = read_cache_folio(&inode->i_data, 0, nfs_symlink_filler, > NULL); > - if (IS_ERR(page)) > - return ERR_CAST(page); > + if (IS_ERR(folio)) > + return ERR_CAST(folio); > } > - set_delayed_call(done, page_put_link, page); > - return page_address(page); > + set_delayed_call(done, page_put_link, &folio->page); > + return folio_address(folio); > } > > /*