aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-05-13 18:59:19 -0400
committerDavid S. Miller <davem@davemloft.net>2011-05-15 01:22:21 -0400
commit1b1cb1f78a5e9d54c13e176020c3e8ded5d081ce (patch)
treebc29b3c20433a678af2868aa5a49a56b8b9468dc /net
parent89c64d755fbf04d7541d526931dc4b38301946d1 (diff)
net: ping: small changes
ping_table is not __read_mostly, since it contains one rwlock, and is static to ping.c ping_port_rover & ping_v4_lookup are static Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/ping.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index a77e2d788dac..7041d09ae5d5 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -49,9 +49,9 @@
49#include <net/checksum.h> 49#include <net/checksum.h>
50 50
51 51
52struct ping_table ping_table __read_mostly; 52static struct ping_table ping_table;
53 53
54u16 ping_port_rover; 54static u16 ping_port_rover;
55 55
56static inline int ping_hashfn(struct net *net, unsigned num, unsigned mask) 56static inline int ping_hashfn(struct net *net, unsigned num, unsigned mask)
57{ 57{
@@ -150,8 +150,8 @@ static void ping_v4_unhash(struct sock *sk)
150 } 150 }
151} 151}
152 152
153struct sock *ping_v4_lookup(struct net *net, u32 saddr, u32 daddr, 153static struct sock *ping_v4_lookup(struct net *net, u32 saddr, u32 daddr,
154 u16 ident, int dif) 154 u16 ident, int dif)
155{ 155{
156 struct hlist_nulls_head *hslot = ping_hashslot(&ping_table, net, ident); 156 struct hlist_nulls_head *hslot = ping_hashslot(&ping_table, net, ident);
157 struct sock *sk = NULL; 157 struct sock *sk = NULL;