summaryrefslogtreecommitdiffstats
path: root/sys/fs/pseudofs/pseudofs_vncache.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-03-01 12:20:49 +0000
committerphk <phk@FreeBSD.org>2005-03-01 12:20:49 +0000
commit42879cd3ce8dab89b16ddaf6d7d10647362a2f14 (patch)
tree9210f07a5ef61a5aa18c5489cb318d2c3e1b391a /sys/fs/pseudofs/pseudofs_vncache.c
parent2df73116dfb9f6d910f8630c658543465b394283 (diff)
downloadFreeBSD-src-42879cd3ce8dab89b16ddaf6d7d10647362a2f14.zip
FreeBSD-src-42879cd3ce8dab89b16ddaf6d7d10647362a2f14.tar.gz
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
Diffstat (limited to 'sys/fs/pseudofs/pseudofs_vncache.c')
-rw-r--r--sys/fs/pseudofs/pseudofs_vncache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/fs/pseudofs/pseudofs_vncache.c b/sys/fs/pseudofs/pseudofs_vncache.c
index 4ea4e1e..3914908 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
OpenPOWER on IntegriCloud