diff options
author | Andrey V. Elsukov <ae@FreeBSD.org> | 2018-07-17 11:33:23 +0000 |
---|---|---|
committer | Andrey V. Elsukov <ae@FreeBSD.org> | 2018-07-17 11:33:23 +0000 |
commit | acf673edf06f1f40157a151ac815691ca17d0b2d (patch) | |
tree | 0c98ab10e2b359ebbe1508125f49677cd0c51887 /sys/net/if_llatbl.c | |
parent | f8c33497370324d83e6911987a64869d69099a78 (diff) | |
download | src-acf673edf06f1f40157a151ac815691ca17d0b2d.tar.gz src-acf673edf06f1f40157a151ac815691ca17d0b2d.zip |
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
Submitted by: hselasky (previous version)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4605
Notes
Notes:
svn path=/head/; revision=336405
Diffstat (limited to 'sys/net/if_llatbl.c')
-rw-r--r-- | sys/net/if_llatbl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if_llatbl.c b/sys/net/if_llatbl.c index a157520120c8..733e1634f7d4 100644 --- a/sys/net/if_llatbl.c +++ b/sys/net/if_llatbl.c @@ -436,6 +436,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); @@ -522,8 +525,6 @@ lltable_free(struct lltable *llt) IF_AFDATA_WUNLOCK(llt->llt_ifp); CK_LIST_FOREACH_SAFE(lle, &dchain, lle_chain, next) { - if (callout_stop(&lle->lle_timer) > 0) - LLE_REMREF(lle); llentry_free(lle); } |