Skip to content

Commit 8063e18

Browse files
Cong Wangborkmann
authored andcommitted
skmsg: Make sk_psock_destroy() static
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
1 parent 60e578e commit 8063e18

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

include/linux/skmsg.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,6 @@ static inline struct sk_psock *sk_psock_get(struct sock *sk)
390390
}
391391

392392
void sk_psock_stop(struct sock *sk, struct sk_psock *psock);
393-
void sk_psock_destroy(struct rcu_head *rcu);
394393
void sk_psock_drop(struct sock *sk, struct sk_psock *psock);
395394

396395
static inline void sk_psock_put(struct sock *sk, struct sk_psock *psock)

net/core/skmsg.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,14 +669,13 @@ static void sk_psock_destroy_deferred(struct work_struct *gc)
669669
kfree(psock);
670670
}
671671

672-
void sk_psock_destroy(struct rcu_head *rcu)
672+
static void sk_psock_destroy(struct rcu_head *rcu)
673673
{
674674
struct sk_psock *psock = container_of(rcu, struct sk_psock, rcu);
675675

676676
INIT_WORK(&psock->gc, sk_psock_destroy_deferred);
677677
schedule_work(&psock->gc);
678678
}
679-
EXPORT_SYMBOL_GPL(sk_psock_destroy);
680679

681680
void sk_psock_drop(struct sock *sk, struct sk_psock *psock)
682681
{

0 commit comments

Comments
 (0)