From 4dadf5b5a55bedc0af5bd071fb125e641148f777 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 14 Sep 2004 19:18:46 -0700 Subject: [PATCH] [IPV4]: Use hlist_for_each_entry_safe in fib_hash_move. Signed-off-by: David S. Miller --- net/ipv4/fib_semantics.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index c9712b655927f..c28eed5ad19bf 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c @@ -527,10 +527,10 @@ static void fib_hash_move(struct hlist_head *new_info_hash, for (i = 0; i < old_size; i++) { struct hlist_head *head = &fib_info_hash[i]; - struct hlist_node *node; + struct hlist_node *node, *n; 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; unsigned int new_hash; @@ -545,10 +545,10 @@ static void fib_hash_move(struct hlist_head *new_info_hash, for (i = 0; i < old_size; i++) { struct hlist_head *lhead = &fib_info_laddrhash[i]; - struct hlist_node *node; + struct hlist_node *node, *n; 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; unsigned int new_hash; -- 2.53.0