Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NFS: Remove the nfs4_label argument from nfs_instantiate()

Pull the label from the fattr instead.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>

authored by

Anna Schumaker and committed by
Trond Myklebust
d91bfc46 1b00ad65

+8 -9
+2 -3
fs/nfs/dir.c
··· 2075 2075 * Code common to create, mkdir, and mknod. 2076 2076 */ 2077 2077 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) 2080 2079 { 2081 2080 struct dentry *d; 2082 2081 2083 - d = nfs_add_or_obtain(dentry, fhandle, fattr, label); 2082 + d = nfs_add_or_obtain(dentry, fhandle, fattr, fattr->label); 2084 2083 if (IS_ERR(d)) 2085 2084 return PTR_ERR(d); 2086 2085
+1 -1
fs/nfs/nfs4proc.c
··· 4859 4859 data->res.fattr->time_start, 4860 4860 NFS_INO_INVALID_DATA); 4861 4861 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); 4863 4863 } 4864 4864 return status; 4865 4865 }
+4 -4
fs/nfs/proc.c
··· 255 255 status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); 256 256 nfs_mark_for_revalidate(dir); 257 257 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); 259 259 nfs_free_createdata(data); 260 260 out: 261 261 dprintk("NFS reply create: %d\n", status); ··· 302 302 status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); 303 303 } 304 304 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); 306 306 nfs_free_createdata(data); 307 307 out: 308 308 dprintk("NFS reply mknod: %d\n", status); ··· 434 434 * should fill in the data with a LOOKUP call on the wire. 435 435 */ 436 436 if (status == 0) 437 - status = nfs_instantiate(dentry, fh, fattr, NULL); 437 + status = nfs_instantiate(dentry, fh, fattr); 438 438 439 439 out_free: 440 440 nfs_free_fattr(fattr); ··· 463 463 status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); 464 464 nfs_mark_for_revalidate(dir); 465 465 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); 467 467 nfs_free_createdata(data); 468 468 out: 469 469 dprintk("NFS reply mkdir: %d\n", status);
+1 -1
include/linux/nfs_fs.h
··· 532 532 struct nfs_fh *fh, struct nfs_fattr *fattr, 533 533 struct nfs4_label *label); 534 534 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); 536 536 extern int nfs_may_open(struct inode *inode, const struct cred *cred, int openflags); 537 537 extern void nfs_access_zap_cache(struct inode *inode); 538 538 extern int nfs_access_get_cached(struct inode *inode, const struct cred *cred, struct nfs_access_entry *res,