summaryrefslogtreecommitdiffstats
path: root/fs/nfs/export.c
diff options
context:
space:
mode:
authorAnna Schumaker <Anna.Schumaker@Netapp.com>2021-10-22 19:11:05 +0200
committerTrond Myklebust <trond.myklebust@hammerspace.com>2021-11-05 19:54:39 +0100
commitba4bc8dc4d937df2b407393435a302550be0ad82 (patch)
tree2dccaac203e9833b2ab72f7f20de3c7a89989d07 /fs/nfs/export.c
parentNFS: Remove the label from the nfs4_lookup_res struct (diff)
downloadlinux-ba4bc8dc4d937df2b407393435a302550be0ad82.tar.xz
linux-ba4bc8dc4d937df2b407393435a302550be0ad82.zip
NFS: Remove the nfs4_label from the nfs4_lookupp_res struct
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/export.c')
-rw-r--r--fs/nfs/export.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/fs/nfs/export.c b/fs/nfs/export.c
index d772c20bbfd1..895b404888dd 100644
--- a/fs/nfs/export.c
+++ b/fs/nfs/export.c
@@ -131,7 +131,6 @@ nfs_get_parent(struct dentry *dentry)
struct super_block *sb = inode->i_sb;
struct nfs_server *server = NFS_SB(sb);
struct nfs_fattr *fattr = NULL;
- struct nfs4_label *label = NULL;
struct dentry *parent;
struct nfs_rpc_ops const *ops = server->nfs_client->rpc_ops;
struct nfs_fh fh;
@@ -139,31 +138,20 @@ nfs_get_parent(struct dentry *dentry)
if (!ops->lookupp)
return ERR_PTR(-EACCES);
- fattr = nfs_alloc_fattr();
- if (fattr == NULL) {
- parent = ERR_PTR(-ENOMEM);
- goto out;
- }
-
- label = nfs4_label_alloc(server, GFP_KERNEL);
- if (IS_ERR(label)) {
- parent = ERR_CAST(label);
- goto out_free_fattr;
- }
+ fattr = nfs_alloc_fattr_with_label(server);
+ if (fattr == NULL)
+ return ERR_PTR(-ENOMEM);
- ret = ops->lookupp(inode, &fh, fattr, label);
+ ret = ops->lookupp(inode, &fh, fattr);
if (ret) {
parent = ERR_PTR(ret);
- goto out_free_label;
+ goto out;
}
- pinode = nfs_fhget(sb, &fh, fattr, label);
+ pinode = nfs_fhget(sb, &fh, fattr, fattr->label);
parent = d_obtain_alias(pinode);
-out_free_label:
- nfs4_label_free(label);
-out_free_fattr:
- nfs_free_fattr(fattr);
out:
+ nfs_free_fattr(fattr);
return parent;
}