From: Andrew Morton Date: Mon, 9 Jul 2007 20:16:00 +0000 (-0700) Subject: [NET]: "wrong timeout value in sk_wait_data()": cleanups X-Git-Tag: v2.6.23-rc1~1109^2~32 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6f11df8355e8f59f7572bf6ac1f63d692483b0c6;p=linux-2.6-omap-h63xx.git [NET]: "wrong timeout value in sk_wait_data()": cleanups - save 4 bytes - it's read-mostly. Signed-off-by: Andrew Morton Acked-by: Vasily Averin Signed-off-by: David S. Miller --- diff --git a/net/core/sock.c b/net/core/sock.c index 252d21a1bb0..091032a250c 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -210,7 +210,8 @@ static int sock_set_timeout(long *timeo_p, char __user *optval, int optlen) return -EDOM; if (tv.tv_sec < 0) { - static int warned = 0; + static int warned __read_mostly; + *timeo_p = 0; if (warned < 10 && net_ratelimit()) warned++;