Skip to content

Commit

Permalink
NFS: Remove the nfs4_label argument from nfs_add_or_obtain()
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
  • Loading branch information
Anna Schumaker authored and Trond Myklebust committed Nov 5, 2021
1 parent d91bfc4 commit cc6f329
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
7 changes: 3 additions & 4 deletions fs/nfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -2036,8 +2036,7 @@ static int nfs4_lookup_revalidate(struct dentry *dentry, unsigned int flags)

struct dentry *
nfs_add_or_obtain(struct dentry *dentry, struct nfs_fh *fhandle,
struct nfs_fattr *fattr,
struct nfs4_label *label)
struct nfs_fattr *fattr)
{
struct dentry *parent = dget_parent(dentry);
struct inode *dir = d_inode(parent);
Expand All @@ -2060,7 +2059,7 @@ nfs_add_or_obtain(struct dentry *dentry, struct nfs_fh *fhandle,
if (error < 0)
goto out_error;
}
inode = nfs_fhget(dentry->d_sb, fhandle, fattr, label);
inode = nfs_fhget(dentry->d_sb, fhandle, fattr, fattr->label);
d = d_splice_alias(inode, dentry);
out:
dput(parent);
Expand All @@ -2079,7 +2078,7 @@ int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fhandle,
{
struct dentry *d;

d = nfs_add_or_obtain(dentry, fhandle, fattr, fattr->label);
d = nfs_add_or_obtain(dentry, fhandle, fattr);
if (IS_ERR(d))
return PTR_ERR(d);

Expand Down
2 changes: 1 addition & 1 deletion fs/nfs/nfs3proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ nfs3_do_create(struct inode *dir, struct dentry *dentry, struct nfs3_createdata
if (status != 0)
return ERR_PTR(status);

return nfs_add_or_obtain(dentry, data->res.fh, data->res.fattr, NULL);
return nfs_add_or_obtain(dentry, data->res.fh, data->res.fattr);
}

static void nfs3_free_createdata(struct nfs3_createdata *data)
Expand Down
3 changes: 1 addition & 2 deletions include/linux/nfs_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,7 @@ extern void nfs_set_verifier(struct dentry * dentry, unsigned long verf);
extern void nfs_clear_verifier_delegated(struct inode *inode);
#endif /* IS_ENABLED(CONFIG_NFS_V4) */
extern struct dentry *nfs_add_or_obtain(struct dentry *dentry,
struct nfs_fh *fh, struct nfs_fattr *fattr,
struct nfs4_label *label);
struct nfs_fh *fh, struct nfs_fattr *fattr);
extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh,
struct nfs_fattr *fattr);
extern int nfs_may_open(struct inode *inode, const struct cred *cred, int openflags);
Expand Down

0 comments on commit cc6f329

Please sign in to comment.