forked from Minki/linux
fib_trie: Minor cleanups to fib_table_flush_external
This change just does a couple of minor cleanups on fib_table_flush_external. Specifically it addresses the fact that resize was being called even though nothing was being removed from the table, and it drops an unecessary indent since we could just call continue on the inverse of the fi && flag check. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
20488239d2
commit
72be72607a
@ -1586,13 +1586,8 @@ backtrace:
|
|||||||
while (!(cindex--)) {
|
while (!(cindex--)) {
|
||||||
t_key pkey = pn->key;
|
t_key pkey = pn->key;
|
||||||
|
|
||||||
n = pn;
|
|
||||||
pn = node_parent(n);
|
|
||||||
|
|
||||||
/* resize completed node */
|
|
||||||
resize(t, n);
|
|
||||||
|
|
||||||
/* if we got the root we are done */
|
/* if we got the root we are done */
|
||||||
|
pn = node_parent(pn);
|
||||||
if (!pn)
|
if (!pn)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1607,12 +1602,13 @@ backtrace:
|
|||||||
hlist_for_each_entry(fa, &n->leaf, fa_list) {
|
hlist_for_each_entry(fa, &n->leaf, fa_list) {
|
||||||
struct fib_info *fi = fa->fa_info;
|
struct fib_info *fi = fa->fa_info;
|
||||||
|
|
||||||
if (fi && (fi->fib_flags & RTNH_F_EXTERNAL)) {
|
if (!fi || !(fi->fib_flags & RTNH_F_EXTERNAL))
|
||||||
netdev_switch_fib_ipv4_del(n->key,
|
continue;
|
||||||
KEYLENGTH - fa->fa_slen,
|
|
||||||
fi, fa->fa_tos,
|
netdev_switch_fib_ipv4_del(n->key,
|
||||||
fa->fa_type, tb->tb_id);
|
KEYLENGTH - fa->fa_slen,
|
||||||
}
|
fi, fa->fa_tos,
|
||||||
|
fa->fa_type, tb->tb_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if trie is leaf only loop is completed */
|
/* if trie is leaf only loop is completed */
|
||||||
|
Loading…
Reference in New Issue
Block a user