ipv4: remove the unnecessary codes in fib_info_hash_move
Subsystems (3)
PATCH 1/1 ipv4: remove the unnecessary codes in fib_info_hash_move
From: Li RongQing <[email protected]>
The whole hlist will be moved, so not need to call hlist_del before add the hlist_node to other hlist_head.
Signed-off-by Li RongQing <[email protected]>
--- net/ipv4/fib_semantics.c | 4 ---- 1 file changed, 4 deletions(-)
net/ipv4/fib_semantics.c +0 -4
@@ -713,8 +713,6 @@ static void fib_info_hash_move(struct hlist_head *new_info_hash,struct hlist_head *dest;unsigned int new_hash; -hlist_del (&fi->fib_hash); - new_hash =fib_info_hashfn (fi); dest = &new_info_hash[new_hash];hlist_add_head (&fi->fib_hash, dest);
@@ -731,8 +729,6 @@ static void fib_info_hash_move(struct hlist_head *new_info_hash,struct hlist_head *ldest;unsigned int new_hash; -hlist_del (&fi->fib_lhash); - new_hash =fib_laddr_hashfn (fi->fib_prefsrc); ldest = &new_laddrhash[new_hash];hlist_add_head (&fi->fib_lhash, ldest);
Signature · 1 line
2.1.0
From: [email protected]
Date: Thu, 30 Apr 2015 17:25:12 +0800
Quoted 6 lines
From: Li RongQing <[email protected]>
The whole hlist will be moved, so not need to call
hlist_delbefore add thehlist_nodeto otherhlist_head.Signed-off-by Li RongQing <[email protected]>
Applied, thanks.