nfscl: Clean up the code by removing unused arguments

The "void *stuff" (also called fstuff and dstuff) argument
was used by the Mac OSX port.  For FreeBSD, this argument
is always NULL, so remove it to clean up the code.

This commit gets rid of "stuff" for nfscl_nget().
Future commits will do the same for other functions.
This commit is contained in:
Rick Macklem 2022-04-14 16:15:56 -07:00
parent 811a82d53a
commit 068fc05745
4 changed files with 11 additions and 12 deletions

View File

@ -653,7 +653,7 @@ int nfscl_layoutcommit(vnode_t, NFSPROC_T *);
/* nfs_clport.c */
int nfscl_nget(mount_t, vnode_t, struct nfsfh *,
struct componentname *, NFSPROC_T *, struct nfsnode **, void *, int);
struct componentname *, NFSPROC_T *, struct nfsnode **, int);
NFSPROC_T *nfscl_getparent(NFSPROC_T *);
void nfscl_start_renewthread(struct nfsclclient *);
void nfscl_loadsbinfo(struct nfsmount *, struct nfsstatfs *, void *);

View File

@ -127,7 +127,7 @@ newnfs_vncmpf(struct vnode *vp, void *arg)
int
nfscl_nget(struct mount *mntp, struct vnode *dvp, struct nfsfh *nfhp,
struct componentname *cnp, struct thread *td, struct nfsnode **npp,
void *stuff, int lkflags)
int lkflags)
{
struct nfsnode *np, *dnp;
struct vnode *vp, *nvp;

View File

@ -4007,7 +4007,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep,
free(nfhp, M_NFSFH);
} else {
error = nfscl_nget(vp->v_mount, vp,
nfhp, cnp, p, &np, NULL, LK_EXCLUSIVE);
nfhp, cnp, p, &np, LK_EXCLUSIVE);
if (!error) {
newvp = NFSTOV(np);
unlocknewvp = 1;

View File

@ -1413,8 +1413,7 @@ nfs_lookup(struct vop_lookup_args *ap)
free(nfhp, M_NFSFH);
return (EISDIR);
}
error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL,
LK_EXCLUSIVE);
error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, LK_EXCLUSIVE);
if (error)
return (error);
newvp = NFSTOV(np);
@ -1458,7 +1457,7 @@ nfs_lookup(struct vop_lookup_args *ap)
return (error);
}
NFSVOPUNLOCK(dvp);
error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL,
error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np,
cnp->cn_lkflags);
if (error == 0)
newvp = NFSTOV(np);
@ -1485,7 +1484,7 @@ nfs_lookup(struct vop_lookup_args *ap)
if (attrflag)
(void) nfscl_loadattrcache(&newvp, &nfsva, NULL, 0, 1);
} else {
error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL,
error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np,
cnp->cn_lkflags);
if (error)
return (error);
@ -1691,7 +1690,7 @@ nfs_mknodrpc(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp,
NULL, 0);
if (nfhp)
error = nfscl_nget(dvp->v_mount, dvp, nfhp, cnp,
curthread, &np, NULL, LK_EXCLUSIVE);
curthread, &np, LK_EXCLUSIVE);
}
if (dattrflag)
(void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, 0, 1);
@ -1806,7 +1805,7 @@ nfs_create(struct vop_create_args *ap)
NULL, 0);
if (nfhp != NULL)
error = nfscl_nget(dvp->v_mount, dvp, nfhp, cnp,
curthread, &np, NULL, LK_EXCLUSIVE);
curthread, &np, LK_EXCLUSIVE);
}
if (dattrflag)
(void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, 0, 1);
@ -2261,7 +2260,7 @@ nfs_symlink(struct vop_symlink_args *ap)
&nfsva, &nfhp, &attrflag, &dattrflag, NULL);
if (nfhp) {
ret = nfscl_nget(dvp->v_mount, dvp, nfhp, cnp, curthread,
&np, NULL, LK_EXCLUSIVE);
&np, LK_EXCLUSIVE);
if (!ret)
newvp = NFSTOV(np);
else if (!error)
@ -2355,7 +2354,7 @@ nfs_mkdir(struct vop_mkdir_args *ap)
}
if (nfhp) {
ret = nfscl_nget(dvp->v_mount, dvp, nfhp, cnp, curthread,
&np, NULL, LK_EXCLUSIVE);
&np, LK_EXCLUSIVE);
if (!ret) {
newvp = NFSTOV(np);
if (attrflag)
@ -2776,7 +2775,7 @@ printf("replace=%s\n",nnn);
cn.cn_nameptr = name;
cn.cn_namelen = len;
error = nfscl_nget(dvp->v_mount, dvp, nfhp, &cn, td,
&np, NULL, LK_EXCLUSIVE);
&np, LK_EXCLUSIVE);
if (error)
return (error);
newvp = NFSTOV(np);