]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
sunrpc: now we can just set ->s_d_op
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 14 Jul 2013 13:55:39 +0000 (17:55 +0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 14 Jul 2013 13:55:39 +0000 (17:55 +0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
net/sunrpc/rpc_pipe.c

index 27e54d265705b9bb537c1f438ba748d6af9a9028..260fe72656a10ea2741c53344d7ae429d6692de2 100644 (file)
@@ -665,10 +665,8 @@ static struct dentry *__rpc_lookup_create_exclusive(struct dentry *parent,
                if (!dentry)
                        return ERR_PTR(-ENOMEM);
        }
-       if (dentry->d_inode == NULL) {
-               d_set_d_op(dentry, &rpc_dentry_operations);
+       if (dentry->d_inode == NULL)
                return dentry;
-       }
        dput(dentry);
        return ERR_PTR(-EEXIST);
 }
@@ -1102,6 +1100,7 @@ rpc_fill_super(struct super_block *sb, void *data, int silent)
        sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
        sb->s_magic = RPCAUTH_GSSMAGIC;
        sb->s_op = &s_ops;
+       sb->s_d_op = &rpc_dentry_operations;
        sb->s_time_gran = 1;
 
        inode = rpc_get_inode(sb, S_IFDIR | S_IRUGO | S_IXUGO);