<dec f='src/src/sys/miscfs/procfs/procfs_vnops.c' l='206' type='int procfs_lookup(void * )'/>
<use f='src/src/sys/miscfs/procfs/procfs_vnops.c' l='252'/>
<use f='src/src/sys/miscfs/procfs/procfs_vnops.c' l='252'/>
<use f='src/src/sys/miscfs/procfs/procfs_vnops.c' l='252'/>
<use f='src/src/sys/miscfs/procfs/procfs_vnops.c' l='252'/>
<def f='src/src/sys/miscfs/procfs/procfs_vnops.c' l='992' ll='1192' type='int procfs_lookup(void * v)'/>
<doc f='src/src/sys/miscfs/procfs/procfs_vnops.c' l='972'>/*
 * lookup.  this is incredibly complicated in the
 * general case, however for most pseudo-filesystems
 * very little needs to be done.
 *
 * Locking isn&apos;t hard here, just poorly documented.
 *
 * If we&apos;re looking up &quot;.&quot;, just vref the parent &amp; return it.
 *
 * If we&apos;re looking up &quot;..&quot;, unlock the parent, and lock &quot;..&quot;. If everything
 * went ok, and we&apos;re on the last component and the caller requested the
 * parent locked, try to re-lock the parent. We do this to prevent lock
 * races.
 *
 * For anything else, get the needed node. Then unlock the parent if not
 * the last component or not LOCKPARENT (i.e. if we wouldn&apos;t re-lock the
 * parent in the .. case).
 *
 * We try to exit with the parent locked in error cases.
 */</doc>
