summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfsclient
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2012-11-16 08:25:06 +0000
committerkib <kib@FreeBSD.org>2012-11-16 08:25:06 +0000
commit801de097168c553834c3d068ebd8c7a2b03d00a9 (patch)
treeccb07158db9f2172e2f9d621713636008488e9e4 /sys/fs/nfsclient
parent94ab185bfb54474f2717c567bd0643288c5c9492 (diff)
downloadFreeBSD-src-801de097168c553834c3d068ebd8c7a2b03d00a9.zip
FreeBSD-src-801de097168c553834c3d068ebd8c7a2b03d00a9.tar.gz
In pget(9), if PGET_NOTWEXIT flag is not specified, also search the
zombie list for the pid. This allows several kern.proc sysctls to report useful information for zombies. Hold the allproc_lock around all searches instead of relocking it. Remove private pfind_locked() from the new nfs client code. Requested and reviewed by: pjd Tested by: pho MFC after: 3 weeks
Diffstat (limited to 'sys/fs/nfsclient')
-rw-r--r--sys/fs/nfsclient/nfs_clport.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c
index c8c5bf5..0257a4c 100644
--- a/sys/fs/nfsclient/nfs_clport.c
+++ b/sys/fs/nfsclient/nfs_clport.c
@@ -1150,31 +1150,6 @@ nfscl_maperr(struct thread *td, int error, uid_t uid, gid_t gid)
}
/*
- * Locate a process by number; return only "live" processes -- i.e., neither
- * zombies nor newly born but incompletely initialized processes. By not
- * returning processes in the PRS_NEW state, we allow callers to avoid
- * testing for that condition to avoid dereferencing p_ucred, et al.
- * Identical to pfind() in kern_proc.c, except it assume the list is
- * already locked.
- */
-static struct proc *
-pfind_locked(pid_t pid)
-{
- struct proc *p;
-
- LIST_FOREACH(p, PIDHASH(pid), p_hash)
- if (p->p_pid == pid) {
- PROC_LOCK(p);
- if (p->p_state == PRS_NEW) {
- PROC_UNLOCK(p);
- p = NULL;
- }
- break;
- }
- return (p);
-}
-
-/*
* Check to see if the process for this owner exists. Return 1 if it doesn't
* and 0 otherwise.
*/
OpenPOWER on IntegriCloud