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
This commit is contained in:
Bjoern A. Zeeb 2019-11-15 23:12:19 +00:00
parent 5caa67fa84
commit d9a61c960c

View File

@ -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 {