Skip to content

Commit d91bfc4

Browse files
amschuma-ntapTrond Myklebust
authored andcommitted
NFS: Remove the nfs4_label argument from nfs_instantiate()
Pull the label from the fattr instead. Signed-off-by: Anna Schumaker <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
1 parent 1b00ad6 commit d91bfc4

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

fs/nfs/dir.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2075,12 +2075,11 @@ EXPORT_SYMBOL_GPL(nfs_add_or_obtain);
20752075
* Code common to create, mkdir, and mknod.
20762076
*/
20772077
int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fhandle,
2078-
struct nfs_fattr *fattr,
2079-
struct nfs4_label *label)
2078+
struct nfs_fattr *fattr)
20802079
{
20812080
struct dentry *d;
20822081

2083-
d = nfs_add_or_obtain(dentry, fhandle, fattr, label);
2082+
d = nfs_add_or_obtain(dentry, fhandle, fattr, fattr->label);
20842083
if (IS_ERR(d))
20852084
return PTR_ERR(d);
20862085

fs/nfs/nfs4proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4859,7 +4859,7 @@ static int nfs4_do_create(struct inode *dir, struct dentry *dentry, struct nfs4_
48594859
data->res.fattr->time_start,
48604860
NFS_INO_INVALID_DATA);
48614861
spin_unlock(&dir->i_lock);
4862-
status = nfs_instantiate(dentry, data->res.fh, data->res.fattr, data->res.fattr->label);
4862+
status = nfs_instantiate(dentry, data->res.fh, data->res.fattr);
48634863
}
48644864
return status;
48654865
}

fs/nfs/proc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ nfs_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
255255
status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
256256
nfs_mark_for_revalidate(dir);
257257
if (status == 0)
258-
status = nfs_instantiate(dentry, data->res.fh, data->res.fattr, NULL);
258+
status = nfs_instantiate(dentry, data->res.fh, data->res.fattr);
259259
nfs_free_createdata(data);
260260
out:
261261
dprintk("NFS reply create: %d\n", status);
@@ -302,7 +302,7 @@ nfs_proc_mknod(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
302302
status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
303303
}
304304
if (status == 0)
305-
status = nfs_instantiate(dentry, data->res.fh, data->res.fattr, NULL);
305+
status = nfs_instantiate(dentry, data->res.fh, data->res.fattr);
306306
nfs_free_createdata(data);
307307
out:
308308
dprintk("NFS reply mknod: %d\n", status);
@@ -434,7 +434,7 @@ nfs_proc_symlink(struct inode *dir, struct dentry *dentry, struct page *page,
434434
* should fill in the data with a LOOKUP call on the wire.
435435
*/
436436
if (status == 0)
437-
status = nfs_instantiate(dentry, fh, fattr, NULL);
437+
status = nfs_instantiate(dentry, fh, fattr);
438438

439439
out_free:
440440
nfs_free_fattr(fattr);
@@ -463,7 +463,7 @@ nfs_proc_mkdir(struct inode *dir, struct dentry *dentry, struct iattr *sattr)
463463
status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
464464
nfs_mark_for_revalidate(dir);
465465
if (status == 0)
466-
status = nfs_instantiate(dentry, data->res.fh, data->res.fattr, NULL);
466+
status = nfs_instantiate(dentry, data->res.fh, data->res.fattr);
467467
nfs_free_createdata(data);
468468
out:
469469
dprintk("NFS reply mkdir: %d\n", status);

include/linux/nfs_fs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ extern struct dentry *nfs_add_or_obtain(struct dentry *dentry,
532532
struct nfs_fh *fh, struct nfs_fattr *fattr,
533533
struct nfs4_label *label);
534534
extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh,
535-
struct nfs_fattr *fattr, struct nfs4_label *label);
535+
struct nfs_fattr *fattr);
536536
extern int nfs_may_open(struct inode *inode, const struct cred *cred, int openflags);
537537
extern void nfs_access_zap_cache(struct inode *inode);
538538
extern int nfs_access_get_cached(struct inode *inode, const struct cred *cred, struct nfs_access_entry *res,

0 commit comments

Comments
 (0)