Commit 4dadf5b5 authored by David S. Miller's avatar David S. Miller

[IPV4]: Use hlist_for_each_entry_safe in fib_hash_move.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 612fb10a
...@@ -527,10 +527,10 @@ static void fib_hash_move(struct hlist_head *new_info_hash, ...@@ -527,10 +527,10 @@ static void fib_hash_move(struct hlist_head *new_info_hash,
for (i = 0; i < old_size; i++) { for (i = 0; i < old_size; i++) {
struct hlist_head *head = &fib_info_hash[i]; struct hlist_head *head = &fib_info_hash[i];
struct hlist_node *node; struct hlist_node *node, *n;
struct fib_info *fi; struct fib_info *fi;
hlist_for_each_entry(fi, node, head, fib_hash) { hlist_for_each_entry_safe(fi, node, n, head, fib_hash) {
struct hlist_head *dest; struct hlist_head *dest;
unsigned int new_hash; unsigned int new_hash;
...@@ -545,10 +545,10 @@ static void fib_hash_move(struct hlist_head *new_info_hash, ...@@ -545,10 +545,10 @@ static void fib_hash_move(struct hlist_head *new_info_hash,
for (i = 0; i < old_size; i++) { for (i = 0; i < old_size; i++) {
struct hlist_head *lhead = &fib_info_laddrhash[i]; struct hlist_head *lhead = &fib_info_laddrhash[i];
struct hlist_node *node; struct hlist_node *node, *n;
struct fib_info *fi; struct fib_info *fi;
hlist_for_each_entry(fi, node, lhead, fib_lhash) { hlist_for_each_entry_safe(fi, node, n, lhead, fib_lhash) {
struct hlist_head *ldest; struct hlist_head *ldest;
unsigned int new_hash; unsigned int new_hash;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment