diff options
author | kib <kib@FreeBSD.org> | 2015-06-10 02:04:02 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-06-10 02:04:02 +0000 |
commit | 49520bf551f282f758d3af69a9366de0fdedc509 (patch) | |
tree | decf3c7afd50d6481e279ec51a27b9259eb15485 /sys/fs | |
parent | 557b40c187f4d913cdc1901b042a7e4d5805ea02 (diff) | |
download | FreeBSD-src-49520bf551f282f758d3af69a9366de0fdedc509.zip FreeBSD-src-49520bf551f282f758d3af69a9366de0fdedc509.tar.gz |
MFC r283600:
Perform SU cleanup in the AST handler. Do not sleep waiting for SU cleanup
while owning vnode lock.
On MFC, for KBI stability, td_su member was moved to the end of the
struct thread.
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/nfsserver/nfs_nfsdkrpc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdkrpc.c b/sys/fs/nfsserver/nfs_nfsdkrpc.c index 1394d0a..e68a18b 100644 --- a/sys/fs/nfsserver/nfs_nfsdkrpc.c +++ b/sys/fs/nfsserver/nfs_nfsdkrpc.c @@ -297,6 +297,8 @@ nfssvc_program(struct svc_req *rqst, SVCXPRT *xprt) svc_freereq(rqst); out: + if (softdep_ast_cleanup != NULL) + softdep_ast_cleanup(); NFSEXITCODE(0); } @@ -467,6 +469,7 @@ int nfsrvd_nfsd(struct thread *td, struct nfsd_nfsd_args *args) { char principal[MAXHOSTNAMELEN + 5]; + struct proc *p; int error = 0; bool_t ret2, ret3, ret4; @@ -484,6 +487,10 @@ nfsrvd_nfsd(struct thread *td, struct nfsd_nfsd_args *args) */ NFSD_LOCK(); if (newnfs_numnfsd == 0) { + p = td->td_proc; + PROC_LOCK(p); + p->p_flag2 |= P2_AST_SU; + PROC_UNLOCK(p); newnfs_numnfsd++; NFSD_UNLOCK(); @@ -515,6 +522,9 @@ nfsrvd_nfsd(struct thread *td, struct nfsd_nfsd_args *args) NFSD_LOCK(); newnfs_numnfsd--; nfsrvd_init(1); + PROC_LOCK(p); + p->p_flag2 &= ~P2_AST_SU; + PROC_UNLOCK(p); } NFSD_UNLOCK(); |