diff options
| author | Yafang Shao <[email protected]> | 2019-01-18 05:00:51 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2019-01-19 18:34:59 +0000 |
| commit | 0726f558d88ecc15b4dd461bdb2ac6bb763cadcb (patch) | |
| tree | f6c6ab48d1c951e2f427425bf74b40a493d2d655 /net/core/sock.c | |
| parent | isdn: remove unneeded semicolon (diff) | |
| download | kernel-0726f558d88ecc15b4dd461bdb2ac6bb763cadcb.tar.gz kernel-0726f558d88ecc15b4dd461bdb2ac6bb763cadcb.zip | |
net: sock: do not set sk_cookie in sk_clone_lock()
The only call site of sk_clone_lock is in inet_csk_clone_lock,
and sk_cookie will be set there.
So we don't need to set sk_cookie in sk_clone_lock().
Reviewed-by: Eric Dumazet <[email protected]>
Signed-off-by: Yafang Shao <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/core/sock.c')
| -rw-r--r-- | net/core/sock.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index b53764ebb973..900e8a9435f5 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -1752,7 +1752,6 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority) newsk->sk_err_soft = 0; newsk->sk_priority = 0; newsk->sk_incoming_cpu = raw_smp_processor_id(); - atomic64_set(&newsk->sk_cookie, 0); if (likely(newsk->sk_net_refcnt)) sock_inuse_add(sock_net(newsk), 1); |
