diff options
| author | David E. O'Brien <obrien@FreeBSD.org> | 2012-10-26 15:44:29 +0000 |
|---|---|---|
| committer | David E. O'Brien <obrien@FreeBSD.org> | 2012-10-26 15:44:29 +0000 |
| commit | 93665dfffbf60248d989a125f1465f54c6bdc4d3 (patch) | |
| tree | bc2dd5e0868cd67553f6b2810707756c76966ea0 /sys/dev/filemon | |
| parent | 3952727d7966ae8f268615e9567a5c3f42f84f9e (diff) | |
Notes
Diffstat (limited to 'sys/dev/filemon')
| -rw-r--r-- | sys/dev/filemon/filemon_wrapper.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/dev/filemon/filemon_wrapper.c b/sys/dev/filemon/filemon_wrapper.c index 278faa917e5e..8ea2cb65a55c 100644 --- a/sys/dev/filemon/filemon_wrapper.c +++ b/sys/dev/filemon/filemon_wrapper.c @@ -82,15 +82,14 @@ filemon_pid_check(struct proc *p) { struct filemon *filemon; - TAILQ_FOREACH(filemon, &filemons_inuse, link) { - if (p->p_pid == filemon->pid) - return (filemon); + while (p->p_pptr) { + TAILQ_FOREACH(filemon, &filemons_inuse, link) { + if (p->p_pid == filemon->pid) + return (filemon); + } + p = p->p_pptr; } - - if (p->p_pptr == NULL) - return (NULL); - - return (filemon_pid_check(p->p_pptr)); + return (NULL); } static void |
