Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nsfs: raise DCACHE_DONTCACHE explicitly

While nsfs dentries are never hashed and thus retain_dentry() will never
consider them for placing them on the LRU it isn't great to always have
to go and remember that. Raise DCACHE_DONTCACHE explicitly as a visual
marker that dentries aren't kept but freed immediately instead.

Link: https://patch.msgid.link/20251029-work-namespace-nstree-listns-v4-3-2e6f823ebdc0@kernel.org
Tested-by: syzbot@syzkaller.appspotmail.com
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>

+1
+1
fs/nsfs.c
··· 591 591 struct pseudo_fs_context *ctx = init_pseudo(fc, NSFS_MAGIC); 592 592 if (!ctx) 593 593 return -ENOMEM; 594 + ctx->s_d_flags |= DCACHE_DONTCACHE; 594 595 ctx->ops = &nsfs_ops; 595 596 ctx->eops = &nsfs_export_operations; 596 597 ctx->dops = &ns_dentry_operations;