From 1b1cb1f78a5e9d54c13e176020c3e8ded5d081ce Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Fri, 13 May 2011 22:59:19 +0000 Subject: [PATCH] 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 Acked-by: Vasiliy Kulikov Signed-off-by: David S. Miller --- net/ipv4/ping.c | 8 ++++---- 1 file 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 @@ #include -struct ping_table ping_table __read_mostly; +static struct ping_table ping_table; -u16 ping_port_rover; +static u16 ping_port_rover; static inline int ping_hashfn(struct net *net, unsigned num, unsigned mask) { @@ -150,8 +150,8 @@ static void ping_v4_unhash(struct sock *sk) } } -struct sock *ping_v4_lookup(struct net *net, u32 saddr, u32 daddr, - u16 ident, int dif) +static struct sock *ping_v4_lookup(struct net *net, u32 saddr, u32 daddr, + u16 ident, int dif) { struct hlist_nulls_head *hslot = ping_hashslot(&ping_table, net, ident); struct sock *sk = NULL; -- GitLab