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.

pidfs: raise DCACHE_DONTCACHE explicitly

While pidfs 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-4-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/pidfs.c
··· 1022 1022 1023 1023 fc->s_iflags |= SB_I_NOEXEC; 1024 1024 fc->s_iflags |= SB_I_NODEV; 1025 + ctx->s_d_flags |= DCACHE_DONTCACHE; 1025 1026 ctx->ops = &pidfs_sops; 1026 1027 ctx->eops = &pidfs_export_operations; 1027 1028 ctx->dops = &pidfs_dentry_operations;