From a24042b7274ce0f0018f95da8189f491c073d083 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp 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