svn commit: r354755 - head/sys/net
Bjoern A. Zeeb
bz at FreeBSD.org
Fri Nov 15 23:12:21 UTC 2019
Author: bz
Date: Fri Nov 15 23:12:19 2019
New Revision: 354755
URL: https://svnweb.freebsd.org/changeset/base/354755
Log:
if_llatbl: change htable_unlink_entry() to early exist if no work to do
Adjust the logic in htable_unlink_entry() to the one in
htable_link_entry() saving a block indent and making it more clear
in which case we do not do any work.
No functional change.
MFC after: 3 weeks
Sponsored by: Netflix
Modified:
head/sys/net/if_llatbl.c
Modified: head/sys/net/if_llatbl.c
==============================================================================
--- head/sys/net/if_llatbl.c Fri Nov 15 23:01:43 2019 (r354754)
+++ head/sys/net/if_llatbl.c Fri Nov 15 23:12:19 2019 (r354755)
@@ -177,15 +177,16 @@ static void
htable_unlink_entry(struct llentry *lle)
{
- if ((lle->la_flags & LLE_LINKED) != 0) {
- IF_AFDATA_WLOCK_ASSERT(lle->lle_tbl->llt_ifp);
- CK_LIST_REMOVE(lle, lle_next);
- lle->la_flags &= ~(LLE_VALID | LLE_LINKED);
+ if ((lle->la_flags & LLE_LINKED) == 0)
+ return;
+
+ IF_AFDATA_WLOCK_ASSERT(lle->lle_tbl->llt_ifp);
+ CK_LIST_REMOVE(lle, lle_next);
+ lle->la_flags &= ~(LLE_VALID | LLE_LINKED);
#if 0
- lle->lle_tbl = NULL;
- lle->lle_head = NULL;
+ lle->lle_tbl = NULL;
+ lle->lle_head = NULL;
#endif
- }
}
struct prefix_match_data {
More information about the svn-src-all
mailing list