summaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_diag.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2025-08-28 13:27:37 +0300
committerJakub Kicinski <kuba@kernel.org>2025-08-30 05:29:24 +0300
commit9529320ad64e614cfaf96e6b8e3d8c0a1245160c (patch)
tree6e94615a1210d139805b8526c3c09d6e06ea84bd /net/ipv4/tcp_diag.c
parent4fd84a0aaf2ba125b441aa09d415022385e66bf2 (diff)
downloadlinux-9529320ad64e614cfaf96e6b8e3d8c0a1245160c.tar.xz
inet_diag: change inet_diag_bc_sk() first argument
We want to have access to the inet_diag_dump_data structure in the following patch. This patch removes duplication in callers. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20250828102738.2065992-5-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4/tcp_diag.c')
-rw-r--r--net/ipv4/tcp_diag.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv4/tcp_diag.c b/net/ipv4/tcp_diag.c
index 4ed6b93527f4..d83efd91f461 100644
--- a/net/ipv4/tcp_diag.c
+++ b/net/ipv4/tcp_diag.c
@@ -320,11 +320,9 @@ static void tcp_diag_dump(struct sk_buff *skb, struct netlink_callback *cb,
u32 idiag_states = r->idiag_states;
struct inet_hashinfo *hashinfo;
int i, num, s_i, s_num;
- struct nlattr *bc;
struct sock *sk;
hashinfo = net->ipv4.tcp_death_row.hashinfo;
- bc = cb_data->inet_diag_nla_bc;
if (idiag_states & TCPF_SYN_RECV)
idiag_states |= TCPF_NEW_SYN_RECV;
s_i = cb->args[1];
@@ -365,7 +363,7 @@ static void tcp_diag_dump(struct sk_buff *skb, struct netlink_callback *cb,
r->id.idiag_sport)
goto next_listen;
- if (!inet_diag_bc_sk(bc, sk))
+ if (!inet_diag_bc_sk(cb_data, sk))
goto next_listen;
if (inet_sk_diag_fill(sk, inet_csk(sk), skb,
@@ -432,7 +430,7 @@ resume_bind_walk:
r->sdiag_family != sk->sk_family)
goto next_bind;
- if (!inet_diag_bc_sk(bc, sk))
+ if (!inet_diag_bc_sk(cb_data, sk))
goto next_bind;
sock_hold(sk);
@@ -519,7 +517,7 @@ next_chunk:
goto next_normal;
twsk_build_assert();
- if (!inet_diag_bc_sk(bc, sk))
+ if (!inet_diag_bc_sk(cb_data, sk))
goto next_normal;
if (!refcount_inc_not_zero(&sk->sk_refcnt))