mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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:
parent
59c55bdde8
commit
4a17fd5229
13 changed files with 28 additions and 14 deletions
|
|
@ -664,7 +664,7 @@ static struct socket *drbd_wait_for_connect(struct drbd_conf *mdev)
|
|||
timeo = mdev->net_conf->try_connect_int * HZ;
|
||||
timeo += (random32() & 1) ? timeo / 7 : -timeo / 7; /* 28.5% random jitter */
|
||||
|
||||
s_listen->sk->sk_reuse = 1; /* SO_REUSEADDR */
|
||||
s_listen->sk->sk_reuse = SK_CAN_REUSE; /* SO_REUSEADDR */
|
||||
s_listen->sk->sk_rcvtimeo = timeo;
|
||||
s_listen->sk->sk_sndtimeo = timeo;
|
||||
drbd_setbufsize(s_listen, mdev->net_conf->sndbuf_size,
|
||||
|
|
@ -841,8 +841,8 @@ retry:
|
|||
}
|
||||
} while (1);
|
||||
|
||||
msock->sk->sk_reuse = 1; /* SO_REUSEADDR */
|
||||
sock->sk->sk_reuse = 1; /* SO_REUSEADDR */
|
||||
msock->sk->sk_reuse = SK_CAN_REUSE; /* SO_REUSEADDR */
|
||||
sock->sk->sk_reuse = SK_CAN_REUSE; /* SO_REUSEADDR */
|
||||
|
||||
sock->sk->sk_allocation = GFP_NOIO;
|
||||
msock->sk->sk_allocation = GFP_NOIO;
|
||||
|
|
|
|||
Loading…
Reference in a new issue