Skip to contentSkip to conversation

"wrong timeout value in sk_wait_data()": cleanups

PATCH Applied [email protected] 2 participants 2 messages Jul 9, 2007

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 3/8 "wrong timeout value in sk_wait_data()": cleanups

From: Andrew Morton <[email protected]>

- save 4 bytes

- it's read-mostly.

---

 net/core/sock.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)
net/core/sock.c renamed from net/core/sock.c~wrong-timeout-value-in-sk_wait_data-v2-fix +2 -1
diff -puN net/core/sock.c~wrong-timeout-value-in-sk_wait_data-v2-fix net/core/sock.c
@@ -210,7 +210,8 @@ static int sock_set_timeout(long *timeo_
 		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++;

_