From 42879cd3ce8dab89b16ddaf6d7d10647362a2f14 Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 1 Mar 2005 12:20:49 +0000 Subject: [PATCH] Avoid a couple of mutex operations in the process exit path for the common case where procfs have never been mounted. OK'ed by: des --- sys/fs/pseudofs/pseudofs_vncache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/fs/pseudofs/pseudofs_vncache.c b/sys/fs/pseudofs/pseudofs_vncache.c index 4ea4e1ea22ab..391490878482 100644 --- a/sys/fs/pseudofs/pseudofs_vncache.c +++ b/sys/fs/pseudofs/pseudofs_vncache.c @@ -226,6 +226,8 @@ pfs_exit(void *arg, struct proc *p) struct pfs_vdata *pvd; struct vnode *vnp; + if (pfs_vncache == NULL) + return; mtx_lock(&Giant); /* * This is extremely inefficient due to the fact that vgone() not