Commit 6f11df83 authored by Andrew Morton's avatar Andrew Morton Committed by David S. Miller

[NET]: "wrong timeout value in sk_wait_data()": cleanups

- save 4 bytes

- it's read-mostly.
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Acked-by: default avatarVasily Averin <vvs@sw.ru>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 60f0438a
...@@ -210,7 +210,8 @@ static int sock_set_timeout(long *timeo_p, char __user *optval, int optlen) ...@@ -210,7 +210,8 @@ static int sock_set_timeout(long *timeo_p, char __user *optval, int optlen)
return -EDOM; return -EDOM;
if (tv.tv_sec < 0) { if (tv.tv_sec < 0) {
static int warned = 0; static int warned __read_mostly;
*timeo_p = 0; *timeo_p = 0;
if (warned < 10 && net_ratelimit()) if (warned < 10 && net_ratelimit())
warned++; warned++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment