diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2025-02-23 20:50:42 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2025-06-11 13:40:01 -0400 |
commit | 3542920b91831974e3b9b3ce4bc083657a4f43d6 (patch) | |
tree | 27be9d95eff4c25e756cff04c3a18f8019b9c624 | |
parent | e95db51c81f54dd12ea465b5127e4786f62a1095 (diff) |
shmem: no dentry retention past the refcount reaching zero
Just set DCACHE_DONTCACHE in ->s_d_flags and be done with that.
Dentries there live for as long as they are pinned; once the
refcount hits zero, that's it. The same, of course, goes for
other tree-in-dcache filesystems - more in the next commits...
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | mm/shmem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index 3583508800fc..94b2b4264607 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -4980,7 +4980,6 @@ static void shmem_put_super(struct super_block *sb) static const struct dentry_operations shmem_ci_dentry_ops = { .d_hash = generic_ci_d_hash, .d_compare = generic_ci_d_compare, - .d_delete = always_delete_dentry, }; #endif @@ -5037,6 +5036,7 @@ static int shmem_fill_super(struct super_block *sb, struct fs_context *fc) #else sb->s_flags |= SB_NOUSER; #endif /* CONFIG_TMPFS */ + sb->s_d_flags |= DCACHE_DONTCACHE; sbinfo->max_blocks = ctx->blocks; sbinfo->max_inodes = ctx->inodes; sbinfo->free_ispace = sbinfo->max_inodes * BOGO_INODE_SIZE; |