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:
parent
5caa67fa84
commit
d9a61c960c
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user