On Wed, Jan 03, 2018 at 01:39:27PM -0600, Christopher Lameter wrote: > +++ linux/fs/dcache.c > @@ -1074,7 +1074,8 @@ static enum lru_status dentry_lru_isolat > return LRU_REMOVED; > } > > - if (dentry->d_flags & DCACHE_REFERENCED) { > + if (dentry->d_flags & DCACHE_REFERENCED && > + kobjects_left_in_slab_page(dentry) > 1) { > dentry->d_flags &= ~DCACHE_REFERENCED; > spin_unlock(&dentry->d_lock); > Maybe also update this comment: /* * Referenced dentries are still in use. If they have active * counts, just remove them from the LRU. Otherwise give them - * another pass through the LRU. + * another pass through the LRU unless they are the only + * object on their slab page. */