mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Avoid taking the lock in selfdfree when not needed.
This commit is contained in:
parent
dc7b26971d
commit
73f2e5f759
1 changed files with 4 additions and 3 deletions
|
|
@ -1600,10 +1600,11 @@ static void
|
|||
selfdfree(struct seltd *stp, struct selfd *sfp)
|
||||
{
|
||||
STAILQ_REMOVE(&stp->st_selq, sfp, selfd, sf_link);
|
||||
mtx_lock(sfp->sf_mtx);
|
||||
if (sfp->sf_si)
|
||||
if (sfp->sf_si != NULL) {
|
||||
mtx_lock(sfp->sf_mtx);
|
||||
TAILQ_REMOVE(&sfp->sf_si->si_tdlist, sfp, sf_threads);
|
||||
mtx_unlock(sfp->sf_mtx);
|
||||
mtx_unlock(sfp->sf_mtx);
|
||||
}
|
||||
uma_zfree(selfd_zone, sfp);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue