]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: remove useless add operation when init sysctl_max_tw_buckets
authorYafang Shao <laoar.shao@gmail.com>
Sat, 1 Sep 2018 12:21:05 +0000 (20:21 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 2 Sep 2018 23:12:41 +0000 (16:12 -0700)
commitf053c7865a06b7b8c51d5ba226c786fa2816327b
tree00361e1606ba513c5f8059cc13d9312abd2d7b50
parent3e57ae5d60074ae77d14da8d37837c487184683d
tcp: remove useless add operation when init sysctl_max_tw_buckets

cp_hashinfo.ehash_mask is always an odd number, which is set in function
alloc_large_system_hash(). See bellow,
        if (_hash_mask)
                *_hash_mask = (1 << log2qty) - 1; <<< always odd number

Hence the local variable 'cnt' is a even number, as a result of that it is
no difference to do the incrementation here.

Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_ipv4.c