From: Christian Brauner Date: Wed, 29 Oct 2025 12:20:17 +0000 (+0100) Subject: pidfs: raise DCACHE_DONTCACHE explicitly X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b21cba8d8719881d7a9c8b746bc932be881af4c8;p=thirdparty%2Flinux.git 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 Signed-off-by: Christian Brauner --- diff --git a/fs/pidfs.c b/fs/pidfs.c index 0ef5b47d796a2..db236427fc2ce 100644 --- a/fs/pidfs.c +++ b/fs/pidfs.c @@ -1022,6 +1022,7 @@ static int pidfs_init_fs_context(struct fs_context *fc) fc->s_iflags |= SB_I_NOEXEC; fc->s_iflags |= SB_I_NODEV; + ctx->s_d_flags |= DCACHE_DONTCACHE; ctx->ops = &pidfs_sops; ctx->eops = &pidfs_export_operations; ctx->dops = &pidfs_dentry_operations;