ipv4: remove the unnecessary codes in fib_info_hash_move
authorLi RongQing <roy.qing.li@gmail.com>
Thu, 30 Apr 2015 09:25:12 +0000 (17:25 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 3 May 2015 02:17:44 +0000 (22:17 -0400)
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>
net/ipv4/fib_semantics.c

index 8d695b6659c715f89e06c31d9890532b34b2727f..28ec3c1823bf390f5508e98777483cf82cc73cee 100644 (file)
@@ -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);
This page took 0.027842 seconds and 5 git commands to generate.