diff options
| author | Christian Brauner <brauner@kernel.org> | 2025-10-29 13:20:16 +0100 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-10-31 10:16:23 +0100 |
| commit | 6dbe134e4bf775572c87aba5a39654c0dbd875a4 (patch) | |
| tree | 4a4e76c43a416c9c97fd0d2d5c65570b3d17c431 | |
| parent | 1e9a9be249ad4cd43ba155ea7e2ed06f15d38eab (diff) | |
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>
| -rw-r--r-- | fs/nsfs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nsfs.c b/fs/nsfs.c index ded833f66d4d..c1661feaccf0 100644 --- a/fs/nsfs.c +++ b/fs/nsfs.c @@ -591,6 +591,7 @@ static int nsfs_init_fs_context(struct fs_context *fc) struct pseudo_fs_context *ctx = init_pseudo(fc, NSFS_MAGIC); if (!ctx) return -ENOMEM; + ctx->s_d_flags |= DCACHE_DONTCACHE; ctx->ops = &nsfs_ops; ctx->eops = &nsfs_export_operations; ctx->dops = &ns_dentry_operations; |