- remove nfs_exit exit hook. ok'ed by christos@.
- as far as i understand the code, it shouldn't be necessary because nfs_request can't return without removing its request and r->r_lwp is either curlwp or NULL. - even if it's necessary, leaking requests is not the correct way to recover from the condition. - nfs_request: add a related assertion.
This commit is contained in:
parent
ca8513e5dc
commit
febe85111f
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfs_socket.c,v 1.154 2007/05/02 16:19:55 yamt Exp $ */
|
||||
/* $NetBSD: nfs_socket.c,v 1.155 2007/05/28 16:47:38 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1991, 1993, 1995
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.154 2007/05/02 16:19:55 yamt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.155 2007/05/28 16:47:38 yamt Exp $");
|
||||
|
||||
#include "fs_nfs.h"
|
||||
#include "opt_nfs.h"
|
||||
@ -997,6 +997,7 @@ tryagain_cred:
|
||||
KASSERT(cred != NULL);
|
||||
MALLOC(rep, struct nfsreq *, sizeof(struct nfsreq), M_NFSREQ, M_WAITOK);
|
||||
rep->r_nmp = nmp;
|
||||
KASSERT(lwp == NULL || lwp == curlwp);
|
||||
rep->r_lwp = lwp;
|
||||
rep->r_procnum = procnum;
|
||||
i = 0;
|
||||
@ -1695,20 +1696,6 @@ nfs_timer(void *arg)
|
||||
callout_schedule(&nfs_timer_ch, nfs_ticks);
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
nfs_exit(struct proc *p, void *v)
|
||||
{
|
||||
struct nfsreq *rp;
|
||||
int s = splsoftnet();
|
||||
|
||||
TAILQ_FOREACH(rp, &nfs_reqq, r_chain) {
|
||||
if (rp->r_lwp && rp->r_lwp->l_proc == p)
|
||||
TAILQ_REMOVE(&nfs_reqq, rp, r_chain);
|
||||
}
|
||||
splx(s);
|
||||
}
|
||||
|
||||
/*
|
||||
* Test for a termination condition pending on the process.
|
||||
* This is used for NFSMNT_INT mounts.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfs_subs.c,v 1.186 2007/04/29 10:30:18 yamt Exp $ */
|
||||
/* $NetBSD: nfs_subs.c,v 1.187 2007/05/28 16:47:38 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -70,7 +70,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: nfs_subs.c,v 1.186 2007/04/29 10:30:18 yamt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: nfs_subs.c,v 1.187 2007/05/28 16:47:38 yamt Exp $");
|
||||
|
||||
#include "fs_nfs.h"
|
||||
#include "opt_nfs.h"
|
||||
@ -1517,8 +1517,6 @@ nfs_init0(void)
|
||||
nfsdreq_init();
|
||||
#endif /* defined(NFSSERVER) || (defined(NFS) && !defined(NFS_V2_ONLY)) */
|
||||
|
||||
exithook_establish(nfs_exit, NULL);
|
||||
|
||||
/*
|
||||
* Initialize reply list and start timer
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfs_var.h,v 1.67 2007/04/29 10:30:19 yamt Exp $ */
|
||||
/* $NetBSD: nfs_var.h,v 1.68 2007/05/28 16:47:38 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -191,7 +191,6 @@ int nfs_rephead(int, struct nfsrv_descript *, struct nfssvc_sock *,
|
||||
int, int, u_quad_t *, struct mbuf **, struct mbuf **, char **);
|
||||
void nfs_timer(void *);
|
||||
int nfs_sigintr(struct nfsmount *, struct nfsreq *, struct lwp *);
|
||||
void nfs_exit(struct proc *, void *);
|
||||
int nfs_getreq(struct nfsrv_descript *, struct nfsd *, int);
|
||||
int nfs_msg(struct lwp *, const char *, const char *);
|
||||
void nfsrv_rcv(struct socket *, void *, int);
|
||||
|
Loading…
x
Reference in New Issue
Block a user