MFC r336405:

Move invoking of callout_stop(&lle->lle_timer) into llentry_free().

  This deduplicates the code a bit, and also implicitly adds missing
  callout_stop() to in[6]_lltable_delete_entry() functions.

  PR:		209682, 225927
This commit is contained in:
ae 2018-08-08 16:09:28 +00:00 committed by Franco Fichtner
parent bb9e423bb5
commit c652a4cf82
3 changed files with 3 additions and 9 deletions

View file

@ -429,6 +429,9 @@ llentry_free(struct llentry *lle)
pkts_dropped = lltable_drop_entry_queue(lle);
/* cancel timer */
if (callout_stop(&lle->lle_timer) > 0)
LLE_REMREF(lle);
LLE_FREE_LOCKED(lle);
return (pkts_dropped);
@ -515,8 +518,6 @@ lltable_free(struct lltable *llt)
IF_AFDATA_WUNLOCK(llt->llt_ifp);
LIST_FOREACH_SAFE(lle, &dchain, lle_chain, next) {
if (callout_stop(&lle->lle_timer) > 0)
LLE_REMREF(lle);
llentry_free(lle);
}

View file

@ -1145,10 +1145,6 @@ in_lltable_free_entry(struct lltable *llt, struct llentry *lle)
lltable_unlink_entry(llt, lle);
}
/* cancel timer */
if (callout_stop(&lle->lle_timer) > 0)
LLE_REMREF(lle);
/* Drop hold queue */
pkts_dropped = llentry_free(lle);
ARPSTAT_ADD(dropped, pkts_dropped);

View file

@ -2107,9 +2107,6 @@ in6_lltable_free_entry(struct lltable *llt, struct llentry *lle)
lltable_unlink_entry(llt, lle);
}
if (callout_stop(&lle->lle_timer) > 0)
LLE_REMREF(lle);
llentry_free(lle);
}