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_clvfsops.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
b0bcedef1a
commit
1e70163c50
@ -510,9 +510,9 @@ int nfsrpc_lock(struct nfsrv_descript *, struct nfsmount *, vnode_t,
|
||||
int nfsrpc_statfs(vnode_t, struct nfsstatfs *, struct nfsfsinfo *,
|
||||
struct ucred *, NFSPROC_T *, struct nfsvattr *, int *);
|
||||
int nfsrpc_fsinfo(vnode_t, struct nfsfsinfo *, struct ucred *,
|
||||
NFSPROC_T *, struct nfsvattr *, int *, void *);
|
||||
NFSPROC_T *, struct nfsvattr *, int *);
|
||||
int nfsrpc_pathconf(vnode_t, struct nfsv3_pathconf *,
|
||||
struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, void *);
|
||||
struct ucred *, NFSPROC_T *, struct nfsvattr *, int *);
|
||||
int nfsrpc_renew(struct nfsclclient *, struct nfsclds *, struct ucred *,
|
||||
NFSPROC_T *);
|
||||
int nfsrpc_rellockown(struct nfsmount *, struct nfscllockowner *, uint8_t *,
|
||||
@ -521,8 +521,8 @@ int nfsrpc_getdirpath(struct nfsmount *, u_char *, struct ucred *,
|
||||
NFSPROC_T *);
|
||||
int nfsrpc_delegreturn(struct nfscldeleg *, struct ucred *,
|
||||
struct nfsmount *, NFSPROC_T *, int);
|
||||
int nfsrpc_getacl(vnode_t, struct ucred *, NFSPROC_T *, NFSACL_T *, void *);
|
||||
int nfsrpc_setacl(vnode_t, struct ucred *, NFSPROC_T *, NFSACL_T *, void *);
|
||||
int nfsrpc_getacl(vnode_t, struct ucred *, NFSPROC_T *, NFSACL_T *);
|
||||
int nfsrpc_setacl(vnode_t, struct ucred *, NFSPROC_T *, NFSACL_T *);
|
||||
int nfsrpc_exchangeid(struct nfsmount *, struct nfsclclient *,
|
||||
struct nfssockreq *, int, uint32_t, struct nfsclds **, struct ucred *,
|
||||
NFSPROC_T *);
|
||||
|
@ -4698,8 +4698,7 @@ nfsrpc_statfs(vnode_t vp, struct nfsstatfs *sbp, struct nfsfsinfo *fsp,
|
||||
*/
|
||||
int
|
||||
nfsrpc_pathconf(vnode_t vp, struct nfsv3_pathconf *pc,
|
||||
struct ucred *cred, NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp,
|
||||
void *stuff)
|
||||
struct ucred *cred, NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp)
|
||||
{
|
||||
struct nfsrv_descript nfsd, *nd = &nfsd;
|
||||
struct nfsmount *nmp;
|
||||
@ -4759,7 +4758,7 @@ nfsrpc_pathconf(vnode_t vp, struct nfsv3_pathconf *pc,
|
||||
*/
|
||||
int
|
||||
nfsrpc_fsinfo(vnode_t vp, struct nfsfsinfo *fsp, 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;
|
||||
@ -4992,8 +4991,7 @@ nfsrpc_delegreturn(struct nfscldeleg *dp, struct ucred *cred,
|
||||
* nfs getacl call.
|
||||
*/
|
||||
int
|
||||
nfsrpc_getacl(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
|
||||
struct acl *aclp, void *stuff)
|
||||
nfsrpc_getacl(vnode_t vp, struct ucred *cred, NFSPROC_T *p, struct acl *aclp)
|
||||
{
|
||||
struct nfsrv_descript nfsd, *nd = &nfsd;
|
||||
int error;
|
||||
@ -5022,8 +5020,7 @@ nfsrpc_getacl(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
|
||||
* nfs setacl call.
|
||||
*/
|
||||
int
|
||||
nfsrpc_setacl(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
|
||||
struct acl *aclp, void *stuff)
|
||||
nfsrpc_setacl(vnode_t vp, struct ucred *cred, NFSPROC_T *p, struct acl *aclp)
|
||||
{
|
||||
int error;
|
||||
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
|
||||
|
@ -309,7 +309,7 @@ nfs_statfs(struct mount *mp, struct statfs *sbp)
|
||||
if (NFSHASNFSV3(nmp) && !NFSHASGOTFSINFO(nmp)) {
|
||||
mtx_unlock(&nmp->nm_mtx);
|
||||
error = nfsrpc_fsinfo(vp, &fs, td->td_ucred, td, &nfsva,
|
||||
&attrflag, NULL);
|
||||
&attrflag);
|
||||
if (!error)
|
||||
gotfsinfo = 1;
|
||||
} else
|
||||
@ -370,7 +370,7 @@ ncl_fsinfo(struct nfsmount *nmp, struct vnode *vp, struct ucred *cred,
|
||||
struct nfsvattr nfsva;
|
||||
int error, attrflag;
|
||||
|
||||
error = nfsrpc_fsinfo(vp, &fs, cred, td, &nfsva, &attrflag, NULL);
|
||||
error = nfsrpc_fsinfo(vp, &fs, cred, td, &nfsva, &attrflag);
|
||||
if (!error) {
|
||||
if (attrflag)
|
||||
(void) nfscl_loadattrcache(&vp, &nfsva, NULL, 0, 1);
|
||||
|
@ -3655,8 +3655,7 @@ nfs_getacl(struct vop_getacl_args *ap)
|
||||
|
||||
if (ap->a_type != ACL_TYPE_NFS4)
|
||||
return (EOPNOTSUPP);
|
||||
error = nfsrpc_getacl(ap->a_vp, ap->a_cred, ap->a_td, ap->a_aclp,
|
||||
NULL);
|
||||
error = nfsrpc_getacl(ap->a_vp, ap->a_cred, ap->a_td, ap->a_aclp);
|
||||
if (error > NFSERR_STALE) {
|
||||
(void) nfscl_maperr(ap->a_td, error, (uid_t)0, (gid_t)0);
|
||||
error = EPERM;
|
||||
@ -3671,8 +3670,7 @@ nfs_setacl(struct vop_setacl_args *ap)
|
||||
|
||||
if (ap->a_type != ACL_TYPE_NFS4)
|
||||
return (EOPNOTSUPP);
|
||||
error = nfsrpc_setacl(ap->a_vp, ap->a_cred, ap->a_td, ap->a_aclp,
|
||||
NULL);
|
||||
error = nfsrpc_setacl(ap->a_vp, ap->a_cred, ap->a_td, ap->a_aclp);
|
||||
if (error > NFSERR_STALE) {
|
||||
(void) nfscl_maperr(ap->a_td, error, (uid_t)0, (gid_t)0);
|
||||
error = EPERM;
|
||||
@ -4427,7 +4425,7 @@ nfs_pathconf(struct vop_pathconf_args *ap)
|
||||
* be used for _PC_NFS4_ACL as well.
|
||||
*/
|
||||
error = nfsrpc_pathconf(vp, &pc, td->td_ucred, td, &nfsva,
|
||||
&attrflag, NULL);
|
||||
&attrflag);
|
||||
if (attrflag != 0)
|
||||
(void) nfscl_loadattrcache(&vp, &nfsva, NULL, 0, 1);
|
||||
if (error != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user