]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
devpts, sunrpc, hostfs: don't bother with ->d_op
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 24 Feb 2025 01:55:05 +0000 (20:55 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 11 Jun 2025 17:40:04 +0000 (13:40 -0400)
Default ->d_op being simple_dentry_operations is equivalent to leaving
it NULL and putting DCACHE_DONTCACHE into ->s_d_flags.

Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/devpts/inode.c
fs/hostfs/hostfs_kern.c
net/sunrpc/rpc_pipe.c

index fd17992ee2981b6473565089b15dac9c7b0b00c0..fdf22264a8e98759d7ef250f49b9d5fadac0cc8d 100644 (file)
@@ -381,7 +381,7 @@ static int devpts_fill_super(struct super_block *s, struct fs_context *fc)
        s->s_blocksize_bits = 10;
        s->s_magic = DEVPTS_SUPER_MAGIC;
        s->s_op = &devpts_sops;
-       set_default_d_op(s, &simple_dentry_operations);
+       s->s_d_flags = DCACHE_DONTCACHE;
        s->s_time_gran = 1;
        fsi->sb = s;
 
index 1c0f5038e19cf32ec0996e44e539f8a714e2dbc3..1f512f8ea757d8d568efc01cafca5f826d27e6a1 100644 (file)
@@ -933,7 +933,7 @@ static int hostfs_fill_super(struct super_block *sb, struct fs_context *fc)
        sb->s_blocksize_bits = 10;
        sb->s_magic = HOSTFS_SUPER_MAGIC;
        sb->s_op = &hostfs_sbops;
-       set_default_d_op(sb, &simple_dentry_operations);
+       sb->s_d_flags = DCACHE_DONTCACHE;
        sb->s_maxbytes = MAX_LFS_FILESIZE;
        err = super_setup_bdi(sb);
        if (err)
index f4e880383f67706ec6d4210bdc87c560c138ea65..b85537191f8f3fdbb30cf44ec1f896e0a314df8a 100644 (file)
@@ -1363,7 +1363,7 @@ rpc_fill_super(struct super_block *sb, struct fs_context *fc)
        sb->s_blocksize_bits = PAGE_SHIFT;
        sb->s_magic = RPCAUTH_GSSMAGIC;
        sb->s_op = &s_ops;
-       set_default_d_op(sb, &simple_dentry_operations);
+       sb->s_d_flags = DCACHE_DONTCACHE;
        sb->s_time_gran = 1;
 
        inode = rpc_get_inode(sb, S_IFDIR | 0555);