sock: Introduce named constants for sk_reuse

Name them in a "backward compatible" manner, i.e. reuse or not
are still 1 and 0 respectively. The reuse value of 2 means that
the socket with it will forcibly reuse everyone else's port.

Signed-off-by: Pavel Emelyanov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
Pavel Emelyanov 2012-04-19 03:39:36 +00:00 • committed by David S. Miller
commit 4a17fd5229
13 changed files with 28 additions and 14 deletions

View file

@ -145,7 +145,7 @@ int rds_tcp_listen_init(void)
if (ret < 0)
goto out;
sock->sk->sk_reuse = 1;
sock->sk->sk_reuse = SK_CAN_REUSE;
rds_tcp_nonagle(sock);
write_lock_bh(&sock->sk->sk_callback_lock);