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 and nfs_clstate.c. This commit should not result in a semantics change.
This commit is contained in:
parent
4c3684ef5c
commit
3c4266eda1
@ -537,7 +537,7 @@ int nfsrpc_getdeviceinfo(struct nfsmount *, uint8_t *, int, uint32_t *,
|
||||
struct nfscldevinfo **, struct ucred *, NFSPROC_T *);
|
||||
int nfsrpc_layoutcommit(struct nfsmount *, uint8_t *, int, int,
|
||||
uint64_t, uint64_t, uint64_t, nfsv4stateid_t *, int, struct ucred *,
|
||||
NFSPROC_T *, void *);
|
||||
NFSPROC_T *);
|
||||
int nfsrpc_layoutreturn(struct nfsmount *, uint8_t *, int, int, int, uint32_t,
|
||||
int, uint64_t, uint64_t, nfsv4stateid_t *, struct ucred *, NFSPROC_T *,
|
||||
uint32_t, uint32_t, char *);
|
||||
@ -549,7 +549,7 @@ int nfscl_findlayoutforio(struct nfscllayout *, uint64_t, uint32_t,
|
||||
struct nfsclflayout **);
|
||||
void nfscl_freenfsclds(struct nfsclds *);
|
||||
int nfsrpc_allocate(vnode_t, off_t, off_t, struct nfsvattr *, int *,
|
||||
struct ucred *, NFSPROC_T *, void *);
|
||||
struct ucred *, NFSPROC_T *);
|
||||
int nfsrpc_deallocate(vnode_t, off_t, off_t, struct nfsvattr *, int *,
|
||||
struct ucred *, NFSPROC_T *);
|
||||
int nfsrpc_copy_file_range(vnode_t, off_t *, vnode_t, off_t *, size_t *,
|
||||
|
@ -219,7 +219,7 @@ static int nfsrpc_createlayout(vnode_t, char *, int, struct vattr *,
|
||||
int, int, int, int *, struct nfsclflayouthead *, int *);
|
||||
static int nfsrpc_layoutget(struct nfsmount *, uint8_t *, int, int, uint64_t,
|
||||
uint64_t, uint64_t, int, int, nfsv4stateid_t *, int *,
|
||||
struct nfsclflayouthead *, struct ucred *, NFSPROC_T *, void *);
|
||||
struct nfsclflayouthead *, struct ucred *, NFSPROC_T *);
|
||||
static int nfsrpc_layoutgetres(struct nfsmount *, vnode_t, uint8_t *,
|
||||
int, nfsv4stateid_t *, int, uint32_t *, struct nfscllayout **,
|
||||
struct nfsclflayouthead *, int, int, int *, struct ucred *, NFSPROC_T *);
|
||||
@ -5355,8 +5355,7 @@ static int
|
||||
nfsrpc_layoutget(struct nfsmount *nmp, uint8_t *fhp, int fhlen, int iomode,
|
||||
uint64_t offset, uint64_t len, uint64_t minlen, int layouttype,
|
||||
int layoutlen, nfsv4stateid_t *stateidp, int *retonclosep,
|
||||
struct nfsclflayouthead *flhp, struct ucred *cred, NFSPROC_T *p,
|
||||
void *stuff)
|
||||
struct nfsclflayouthead *flhp, struct ucred *cred, NFSPROC_T *p)
|
||||
{
|
||||
struct nfsrv_descript nfsd, *nd = &nfsd;
|
||||
int error;
|
||||
@ -5620,7 +5619,7 @@ nfsrpc_getdeviceinfo(struct nfsmount *nmp, uint8_t *deviceid, int layouttype,
|
||||
int
|
||||
nfsrpc_layoutcommit(struct nfsmount *nmp, uint8_t *fh, int fhlen, int reclaim,
|
||||
uint64_t off, uint64_t len, uint64_t lastbyte, nfsv4stateid_t *stateidp,
|
||||
int layouttype, struct ucred *cred, NFSPROC_T *p, void *stuff)
|
||||
int layouttype, struct ucred *cred, NFSPROC_T *p)
|
||||
{
|
||||
uint32_t *tl;
|
||||
struct nfsrv_descript nfsd, *nd = &nfsd;
|
||||
@ -5834,7 +5833,7 @@ nfsrpc_getlayout(struct nfsmount *nmp, vnode_t vp, struct nfsfh *nfhp,
|
||||
error = nfsrpc_layoutget(nmp, nfhp->nfh_fh,
|
||||
nfhp->nfh_len, iomode, (uint64_t)0, UINT64_MAX,
|
||||
(uint64_t)0, layouttype, layoutlen, &stateid,
|
||||
&retonclose, &flh, cred, p, NULL);
|
||||
&retonclose, &flh, cred, p);
|
||||
} else {
|
||||
islocked = 1;
|
||||
stateid.seqid = lyp->nfsly_stateid.seqid;
|
||||
@ -5844,7 +5843,7 @@ nfsrpc_getlayout(struct nfsmount *nmp, vnode_t vp, struct nfsfh *nfhp,
|
||||
error = nfsrpc_layoutget(nmp, nfhp->nfh_fh,
|
||||
nfhp->nfh_len, iomode, off, UINT64_MAX,
|
||||
(uint64_t)0, layouttype, layoutlen, &stateid,
|
||||
&retonclose, &flh, cred, p, NULL);
|
||||
&retonclose, &flh, cred, p);
|
||||
}
|
||||
error = nfsrpc_layoutgetres(nmp, vp, nfhp->nfh_fh,
|
||||
nfhp->nfh_len, &stateid, retonclose, notifybitsp, &lyp,
|
||||
@ -7382,7 +7381,7 @@ nfsio_adviseds(vnode_t vp, uint64_t offset, int cnt, int advise,
|
||||
*/
|
||||
int
|
||||
nfsrpc_allocate(vnode_t vp, off_t off, off_t len, struct nfsvattr *nap,
|
||||
int *attrflagp, struct ucred *cred, NFSPROC_T *p, void *stuff)
|
||||
int *attrflagp, struct ucred *cred, NFSPROC_T *p)
|
||||
{
|
||||
int error, expireret = 0, retrycnt, nostateid;
|
||||
uint32_t clidrev = 0;
|
||||
|
@ -5808,7 +5808,7 @@ nfscl_dolayoutcommit(struct nfsmount *nmp, struct nfscllayout *lyp,
|
||||
error = nfsrpc_layoutcommit(nmp, lyp->nfsly_fh,
|
||||
lyp->nfsly_fhlen, 0, flp->nfsfl_off, len,
|
||||
lyp->nfsly_lastbyte, &lyp->nfsly_stateid,
|
||||
layouttype, cred, p, NULL);
|
||||
layouttype, cred, p);
|
||||
NFSCL_DEBUG(4, "layoutcommit err=%d\n", error);
|
||||
if (error == NFSERR_NOTSUPP) {
|
||||
/* If not supported, don't bother doing it. */
|
||||
|
@ -3763,7 +3763,7 @@ nfs_allocate(struct vop_allocate_args *ap)
|
||||
error = ncl_flush(vp, MNT_WAIT, td, 1, 0);
|
||||
if (error == 0)
|
||||
error = nfsrpc_allocate(vp, *ap->a_offset, alen,
|
||||
&nfsva, &attrflag, ap->a_cred, td, NULL);
|
||||
&nfsva, &attrflag, ap->a_cred, td);
|
||||
if (error == 0) {
|
||||
*ap->a_offset += alen;
|
||||
*ap->a_len -= alen;
|
||||
|
Loading…
Reference in New Issue
Block a user