]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ramfs, hugetlbfs, mqueue: set DCACHE_DONTCACHE
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 24 Feb 2025 03:14:47 +0000 (22:14 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 11 Jun 2025 17:41:05 +0000 (13:41 -0400)
makes simple_lookup() slightly cheaper there - no need for
simple_lookup() to set the flag and we want it on everything
on those anyway.

Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/hugetlbfs/inode.c
fs/ramfs/inode.c
ipc/mqueue.c

index e4de5425838d92c861d5e1f4811ab6ec2582ccc3..6e0ade365a334731e180a302103a48adf4d55af0 100644 (file)
@@ -1433,6 +1433,7 @@ hugetlbfs_fill_super(struct super_block *sb, struct fs_context *fc)
        sb->s_blocksize_bits = huge_page_shift(ctx->hstate);
        sb->s_magic = HUGETLBFS_MAGIC;
        sb->s_op = &hugetlbfs_ops;
+       sb->s_d_flags = DCACHE_DONTCACHE;
        sb->s_time_gran = 1;
 
        /*
index 775fa905fda00964290a2b9a6199eebdaaf889b7..f8874c3b8c1e95b06c83f01a269f7412e9d18895 100644 (file)
@@ -269,6 +269,7 @@ static int ramfs_fill_super(struct super_block *sb, struct fs_context *fc)
        sb->s_blocksize_bits    = PAGE_SHIFT;
        sb->s_magic             = RAMFS_MAGIC;
        sb->s_op                = &ramfs_ops;
+       sb->s_d_flags           = DCACHE_DONTCACHE;
        sb->s_time_gran         = 1;
 
        inode = ramfs_get_inode(sb, NULL, S_IFDIR | fsi->mount_opts.mode, 0);
index 82ed2d3c98463ebfedb2a476b251b51abacf97a3..482af449e00da770f3c28628677e17067156ff07 100644 (file)
@@ -411,6 +411,7 @@ static int mqueue_fill_super(struct super_block *sb, struct fs_context *fc)
        sb->s_blocksize_bits = PAGE_SHIFT;
        sb->s_magic = MQUEUE_MAGIC;
        sb->s_op = &mqueue_super_ops;
+       sb->s_d_flags = DCACHE_DONTCACHE;
 
        inode = mqueue_get_inode(sb, ns, S_IFDIR | S_ISVTX | S_IRWXUGO, NULL);
        if (IS_ERR(inode))