Re: [PATCH 12/21] shmem: no dentry retention past the refcount reaching zero

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 24, 2025 at 09:20:42PM +0000, Al Viro wrote:
> 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...
> 
> Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
> ---

Reviewed-by: Christian Brauner <brauner@xxxxxxxxxx>

>  mm/shmem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/shmem.c b/mm/shmem.c
> index 0ecb49113bb2..dd84b1c554a8 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -4971,7 +4971,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
>  
> @@ -5028,6 +5027,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;
> -- 
> 2.39.5
> 




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux