Skip to content

Commit 3333ed3

Browse files
author
Al Viro
committed
ramfs, hugetlbfs, mqueue: set DCACHE_DONTCACHE
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>
1 parent 0b136e7 commit 3333ed3

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

fs/hugetlbfs/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,6 +1433,7 @@ hugetlbfs_fill_super(struct super_block *sb, struct fs_context *fc)
14331433
sb->s_blocksize_bits = huge_page_shift(ctx->hstate);
14341434
sb->s_magic = HUGETLBFS_MAGIC;
14351435
sb->s_op = &hugetlbfs_ops;
1436+
sb->s_d_flags = DCACHE_DONTCACHE;
14361437
sb->s_time_gran = 1;
14371438

14381439
/*

fs/ramfs/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ static int ramfs_fill_super(struct super_block *sb, struct fs_context *fc)
269269
sb->s_blocksize_bits = PAGE_SHIFT;
270270
sb->s_magic = RAMFS_MAGIC;
271271
sb->s_op = &ramfs_ops;
272+
sb->s_d_flags = DCACHE_DONTCACHE;
272273
sb->s_time_gran = 1;
273274

274275
inode = ramfs_get_inode(sb, NULL, S_IFDIR | fsi->mount_opts.mode, 0);

ipc/mqueue.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ static int mqueue_fill_super(struct super_block *sb, struct fs_context *fc)
411411
sb->s_blocksize_bits = PAGE_SHIFT;
412412
sb->s_magic = MQUEUE_MAGIC;
413413
sb->s_op = &mqueue_super_ops;
414+
sb->s_d_flags = DCACHE_DONTCACHE;
414415

415416
inode = mqueue_get_inode(sb, ns, S_IFDIR | S_ISVTX | S_IRWXUGO, NULL);
416417
if (IS_ERR(inode))

0 commit comments

Comments
 (0)