Skip to content

Commit

Permalink
ipv4: remove the unnecessary codes in fib_info_hash_move
Browse files Browse the repository at this point in the history
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 <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Li RongQing authored and David S. Miller committed May 3, 2015
1 parent 3715544 commit 7eee8cd
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions net/ipv4/fib_semantics.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 7eee8cd

Please sign in to comment.