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 assorted functions defined in nfs_clrpcops.c and called in nfs_clvnops.c. Future commits will do the same for other functions. This commit should not result in a semantics change.
This commit is contained in:
parent
73702c3980
commit
1c665e95d4
@ -464,11 +464,11 @@ int nfsrpc_setattr(vnode_t, struct vattr *, NFSACL_T *, struct ucred *,
|
||||
NFSPROC_T *, struct nfsvattr *, int *);
|
||||
int nfsrpc_lookup(vnode_t, char *, int, struct ucred *, NFSPROC_T *,
|
||||
struct nfsvattr *, struct nfsvattr *, struct nfsfh **, int *, int *,
|
||||
void *, uint32_t);
|
||||
uint32_t);
|
||||
int nfsrpc_readlink(vnode_t, struct uio *, struct ucred *,
|
||||
NFSPROC_T *, struct nfsvattr *, int *, void *);
|
||||
NFSPROC_T *, struct nfsvattr *, int *);
|
||||
int nfsrpc_read(vnode_t, struct uio *, struct ucred *, NFSPROC_T *,
|
||||
struct nfsvattr *, int *, void *);
|
||||
struct nfsvattr *, int *);
|
||||
int nfsrpc_write(vnode_t, struct uio *, int *, int *,
|
||||
struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, int, int);
|
||||
int nfsrpc_mknod(vnode_t, char *, int, struct vattr *, u_int32_t,
|
||||
|
@ -1395,8 +1395,7 @@ nfsrpc_setattrrpc(vnode_t vp, struct vattr *vap,
|
||||
int
|
||||
nfsrpc_lookup(vnode_t dvp, char *name, int len, struct ucred *cred,
|
||||
NFSPROC_T *p, struct nfsvattr *dnap, struct nfsvattr *nap,
|
||||
struct nfsfh **nfhpp, int *attrflagp, int *dattrflagp, void *stuff,
|
||||
uint32_t openmode)
|
||||
struct nfsfh **nfhpp, int *attrflagp, int *dattrflagp, uint32_t openmode)
|
||||
{
|
||||
uint32_t deleg, rflags, *tl;
|
||||
struct nfsrv_descript nfsd, *nd = &nfsd;
|
||||
@ -1635,7 +1634,7 @@ nfsrpc_lookup(vnode_t dvp, char *name, int len, struct ucred *cred,
|
||||
*/
|
||||
int
|
||||
nfsrpc_readlink(vnode_t vp, struct uio *uiop, struct ucred *cred,
|
||||
NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp, void *stuff)
|
||||
NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp)
|
||||
{
|
||||
u_int32_t *tl;
|
||||
struct nfsrv_descript nfsd, *nd = &nfsd;
|
||||
@ -1691,7 +1690,7 @@ nfsrpc_readlink(vnode_t vp, struct uio *uiop, struct ucred *cred,
|
||||
*/
|
||||
int
|
||||
nfsrpc_read(vnode_t vp, struct uio *uiop, struct ucred *cred,
|
||||
NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp, void *stuff)
|
||||
NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp)
|
||||
{
|
||||
int error, expireret = 0, retrycnt;
|
||||
u_int32_t clidrev = 0;
|
||||
|
@ -1346,7 +1346,7 @@ nfs_lookup(struct vop_lookup_args *ap)
|
||||
nanouptime(&ts);
|
||||
error = nfsrpc_lookup(dvp, cnp->cn_nameptr, cnp->cn_namelen,
|
||||
cnp->cn_cred, td, &dnfsva, &nfsva, &nfhp, &attrflag, &dattrflag,
|
||||
NULL, openmode);
|
||||
openmode);
|
||||
if (dattrflag)
|
||||
(void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, 0, 1);
|
||||
if (error) {
|
||||
@ -1567,7 +1567,7 @@ ncl_readlinkrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred)
|
||||
struct nfsvattr nfsva;
|
||||
|
||||
error = nfsrpc_readlink(vp, uiop, cred, uiop->uio_td, &nfsva,
|
||||
&attrflag, NULL);
|
||||
&attrflag);
|
||||
if (attrflag) {
|
||||
ret = nfscl_loadattrcache(&vp, &nfsva, NULL, 0, 1);
|
||||
if (ret && !error)
|
||||
@ -1598,7 +1598,7 @@ ncl_readrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred)
|
||||
NFSCL_DEBUG(4, "readrpc: aft doiods=%d\n", error);
|
||||
if (error != 0)
|
||||
error = nfsrpc_read(vp, uiop, cred, uiop->uio_td, &nfsva,
|
||||
&attrflag, NULL);
|
||||
&attrflag);
|
||||
if (attrflag) {
|
||||
ret = nfscl_loadattrcache(&vp, &nfsva, NULL, 0, 1);
|
||||
if (ret && !error)
|
||||
@ -1678,8 +1678,7 @@ nfs_mknodrpc(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp,
|
||||
if (!nfhp)
|
||||
(void) nfsrpc_lookup(dvp, cnp->cn_nameptr,
|
||||
cnp->cn_namelen, cnp->cn_cred, curthread,
|
||||
&dnfsva, &nfsva, &nfhp, &attrflag, &dattrflag,
|
||||
NULL, 0);
|
||||
&dnfsva, &nfsva, &nfhp, &attrflag, &dattrflag, 0);
|
||||
if (nfhp)
|
||||
error = nfscl_nget(dvp->v_mount, dvp, nfhp, cnp,
|
||||
curthread, &np, LK_EXCLUSIVE);
|
||||
@ -1793,8 +1792,7 @@ nfs_create(struct vop_create_args *ap)
|
||||
if (nfhp == NULL)
|
||||
(void) nfsrpc_lookup(dvp, cnp->cn_nameptr,
|
||||
cnp->cn_namelen, cnp->cn_cred, curthread,
|
||||
&dnfsva, &nfsva, &nfhp, &attrflag, &dattrflag,
|
||||
NULL, 0);
|
||||
&dnfsva, &nfsva, &nfhp, &attrflag, &dattrflag, 0);
|
||||
if (nfhp != NULL)
|
||||
error = nfscl_nget(dvp->v_mount, dvp, nfhp, cnp,
|
||||
curthread, &np, LK_EXCLUSIVE);
|
||||
@ -2711,7 +2709,7 @@ nfs_lookitup(struct vnode *dvp, char *name, int len, struct ucred *cred,
|
||||
|
||||
nanouptime(&ts);
|
||||
error = nfsrpc_lookup(dvp, name, len, cred, td, &dnfsva, &nfsva,
|
||||
&nfhp, &attrflag, &dattrflag, NULL, 0);
|
||||
&nfhp, &attrflag, &dattrflag, 0);
|
||||
if (dattrflag)
|
||||
(void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, 0, 1);
|
||||
if (npp && !error) {
|
||||
|
Loading…
Reference in New Issue
Block a user