History

ipv4: remove the unnecessary codes in fib_info_hash_move

The whole hlist will be moved, so not need to call hlist_del before add the hlist_node to other hlist_head.

Li RongQing committed 11 years ago

Commit 7eee8cd1 parent 37155441 file · +0 −4Browse files

Unified · Split

net/ipv4/fib_semantics.c+0−4
@@ -713,8 +713,6 @@ static void fib_info_hash_move(struct hlist_head *new_info_hash, · 712 unmodified lines
713 struct hlist_head *dest;713 struct hlist_head *dest;
714 unsigned int new_hash;714 unsigned int new_hash;
715 715
716 hlist_del(&fi->fib_hash);
717
718 new_hash = fib_info_hashfn(fi);716 new_hash = fib_info_hashfn(fi);
719 dest = &new_info_hash[new_hash];717 dest = &new_info_hash[new_hash];
720 hlist_add_head(&fi->fib_hash, dest);718 hlist_add_head(&fi->fib_hash, dest);
@@ -731,8 +729,6 @@ static void fib_info_hash_move(struct hlist_head *new_info_hash, · 10 unmodified lines
731 struct hlist_head *ldest;729 struct hlist_head *ldest;
732 unsigned int new_hash;730 unsigned int new_hash;
733 731
734 hlist_del(&fi->fib_lhash);
735
736 new_hash = fib_laddr_hashfn(fi->fib_prefsrc);732 new_hash = fib_laddr_hashfn(fi->fib_prefsrc);
737 ldest = &new_laddrhash[new_hash];733 ldest = &new_laddrhash[new_hash];
738 hlist_add_head(&fi->fib_lhash, ldest);734 hlist_add_head(&fi->fib_lhash, ldest);