Avoid taking PROC_LOCK in syscalls if not being traced.

MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Bryan Drewery 2016-08-12 16:05:53 +00:00
parent 15919690b5
commit f566b25e0d
1 changed files with 2 additions and 0 deletions

View File

@ -137,6 +137,8 @@ filemon_proc_get(struct proc *p)
{
struct filemon *filemon;
if (p->p_filemon == NULL)
return (NULL);
PROC_LOCK(p);
filemon = filemon_acquire(p->p_filemon);
PROC_UNLOCK(p);