summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfs/nfs_commonport.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/nfs/nfs_commonport.c')
-rw-r--r--sys/fs/nfs/nfs_commonport.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c
index 2853854..4935b70 100644
--- a/sys/fs/nfs/nfs_commonport.c
+++ b/sys/fs/nfs/nfs_commonport.c
@@ -329,6 +329,7 @@ nfsvno_pathconf(struct vnode *vp, int flag, register_t *retf,
};
error = 0;
}
+ NFSEXITCODE(error);
return (error);
}
@@ -427,6 +428,7 @@ nfssvc_nfscommon(struct thread *td, struct nfssvc_args *uap)
int error;
error = nfssvc_call(td, uap, td->td_ucred);
+ NFSEXITCODE(error);
return (error);
}
@@ -439,9 +441,9 @@ nfssvc_call(struct thread *p, struct nfssvc_args *uap, struct ucred *cred)
if (uap->flag & NFSSVC_IDNAME) {
error = copyin(uap->argp, (caddr_t)&nid, sizeof (nid));
if (error)
- return (error);
+ goto out;
error = nfssvc_idname(&nid);
- return (error);
+ goto out;
} else if (uap->flag & NFSSVC_GETSTATS) {
error = copyout(&newnfsstats,
CAST_USER_ADDR_T(uap->argp), sizeof (newnfsstats));
@@ -503,7 +505,7 @@ nfssvc_call(struct thread *p, struct nfssvc_args *uap, struct ucred *cred)
sizeof(newnfsstats.cbrpccnt));
}
}
- return (error);
+ goto out;
} else if (uap->flag & NFSSVC_NFSUSERDPORT) {
u_short sockport;
@@ -515,6 +517,9 @@ nfssvc_call(struct thread *p, struct nfssvc_args *uap, struct ucred *cred)
nfsrv_nfsuserddelport();
error = 0;
}
+
+out:
+ NFSEXITCODE(error);
return (error);
}
@@ -569,7 +574,7 @@ nfscommon_modevent(module_t mod, int type, void *data)
switch (type) {
case MOD_LOAD:
if (loaded)
- return (0);
+ goto out;
newnfs_portinit();
mtx_init(&nfs_nameid_mutex, "nfs_nameid_mutex", NULL, MTX_DEF);
mtx_init(&nfs_sockl_mutex, "nfs_sockl_mutex", NULL, MTX_DEF);
@@ -606,6 +611,9 @@ nfscommon_modevent(module_t mod, int type, void *data)
error = EOPNOTSUPP;
break;
}
+
+out:
+ NFSEXITCODE(error);
return error;
}
static moduledata_t nfscommon_mod = {
OpenPOWER on IntegriCloud