mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
[NET]: "wrong timeout value in sk_wait_data()": cleanups
- save 4 bytes - it's read-mostly. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Vasily Averin <vvs@sw.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
60f0438a87
commit
6f11df8355
1 changed files with 2 additions and 1 deletions
|
@ -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++;
|
||||||
|
|
Loading…
Add table
Reference in a new issue