mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Avoid taking proctree_lock and searching parents in wrappers if not needed.
This should help the case where filemon is loaded but not in use. Sponsored by: EMC / Isilon Storage Division MFC after: 2 weeks
This commit is contained in:
parent
9fa45e4864
commit
8b64fa1e12
1 changed files with 4 additions and 0 deletions
|
|
@ -88,6 +88,10 @@ filemon_pid_check(struct proc *p)
|
|||
struct filemon *filemon;
|
||||
|
||||
filemon_lock_read();
|
||||
if (TAILQ_EMPTY(&filemons_inuse)) {
|
||||
filemon_unlock_read();
|
||||
return (NULL);
|
||||
}
|
||||
sx_slock(&proctree_lock);
|
||||
while (p != initproc) {
|
||||
TAILQ_FOREACH(filemon, &filemons_inuse, link) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue