On Fri, 2025-02-14 at 15:57 +0000, Matthew Wilcox (Oracle) wrote: > Pass a folio around instead of a page. This removes an access to > page->index and a few hidden calls to compound_head(). > > Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> > --- > fs/ceph/dir.c | 13 +++++++------ > fs/ceph/inode.c | 26 ++++++++++++++------------ > fs/ceph/super.h | 2 +- > 3 files changed, 22 insertions(+), 19 deletions(-) > > diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c > index 62e99e65250d..66f00604c86b 100644 > --- a/fs/ceph/dir.c > +++ b/fs/ceph/dir.c > @@ -141,17 +141,18 @@ __dcache_find_get_entry(struct dentry *parent, u64 idx, > if (ptr_pos >= i_size_read(dir)) > return NULL; > > - if (!cache_ctl->page || ptr_pgoff != cache_ctl->page->index) { > + if (!cache_ctl->folio || ptr_pgoff != cache_ctl->folio->index) { > ceph_readdir_cache_release(cache_ctl); > - cache_ctl->page = find_lock_page(&dir->i_data, ptr_pgoff); > - if (!cache_ctl->page) { > + cache_ctl->folio = filemap_lock_folio(&dir->i_data, ptr_pgoff); > + if (IS_ERR(cache_ctl->folio)) { > + cache_ctl->folio = NULL; > doutc(cl, " page %lu not found\n", ptr_pgoff); Maybe, we need to change debug output here too? doutc(cl, " folio %lu not found\n", ptr_pgoff); Thanks, Slava.