]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
skmsg: Make sk_psock_destroy() static
authorCong Wang <cong.wang@bytedance.com>
Wed, 27 Jan 2021 22:15:01 +0000 (14:15 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 27 Jan 2021 23:35:03 +0000 (00:35 +0100)
sk_psock_destroy() is a RCU callback, I can't see any reason why
it could be used outside.

Signed-off-by: Cong Wang <cong.wang@bytedance.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: Jakub Sitnicki <jakub@cloudflare.com>
Cc: Lorenz Bauer <lmb@cloudflare.com>
Link: https://lore.kernel.org/bpf/20210127221501.46866-1-xiyou.wangcong@gmail.com
include/linux/skmsg.h
net/core/skmsg.c

index fec0c5ac1c4f943f6a4375a869b78cf164377722..8edbbf5f2f9325d120b67a661f2a33bbfec861a3 100644 (file)
@@ -390,7 +390,6 @@ static inline struct sk_psock *sk_psock_get(struct sock *sk)
 }
 
 void sk_psock_stop(struct sock *sk, struct sk_psock *psock);
-void sk_psock_destroy(struct rcu_head *rcu);
 void sk_psock_drop(struct sock *sk, struct sk_psock *psock);
 
 static inline void sk_psock_put(struct sock *sk, struct sk_psock *psock)
index 25cdbb20f3a037e3c9f324a41449034001f3b48d..1261512d680735a0b3a7d8201544d53e5162b6a1 100644 (file)
@@ -669,14 +669,13 @@ static void sk_psock_destroy_deferred(struct work_struct *gc)
        kfree(psock);
 }
 
-void sk_psock_destroy(struct rcu_head *rcu)
+static void sk_psock_destroy(struct rcu_head *rcu)
 {
        struct sk_psock *psock = container_of(rcu, struct sk_psock, rcu);
 
        INIT_WORK(&psock->gc, sk_psock_destroy_deferred);
        schedule_work(&psock->gc);
 }
-EXPORT_SYMBOL_GPL(sk_psock_destroy);
 
 void sk_psock_drop(struct sock *sk, struct sk_psock *psock)
 {