]> www.infradead.org Git - nvme.git/commitdiff
net/core: remove redundant sk_callback_lock initialization
authorGou Hao <gouhao@uniontech.com>
Sun, 26 May 2024 14:57:17 +0000 (22:57 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 28 May 2024 11:29:36 +0000 (13:29 +0200)
sk_callback_lock has already been initialized in sk_init_common().

Signed-off-by: Gou Hao <gouhao@uniontech.com>
Reviewed-by: Breno Leitao <leitao@debian.org>
Link: https://lore.kernel.org/r/20240526145718.9542-1-gouhao@uniontech.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/core/sock.c

index 8629f9aecf91a36cdd17d91371b0480894969f2b..67b10954e0cfbc360d7b102a31e44235f4357dc9 100644 (file)
@@ -3460,7 +3460,6 @@ void sock_init_data_uid(struct socket *sock, struct sock *sk, kuid_t uid)
        }
        sk->sk_uid      =       uid;
 
-       rwlock_init(&sk->sk_callback_lock);
        if (sk->sk_kern_sock)
                lockdep_set_class_and_name(
                        &sk->sk_callback_lock,