diff options
author | Kuniyuki Iwashima | 2022-06-19 16:29:27 -0700 |
---|---|---|
committer | David S. Miller | 2022-06-20 09:10:13 +0100 |
commit | f289c02bf41b55fbfccf21d72c4ac44cd4a7a107 (patch) | |
tree | 8a90d3251bf1e6c02a45be0667b0147aa5c5765a /net/ipv4/raw_diag.c | |
parent | 5da39e31b1b0eb62b8ed369ad9615da850239e9e (diff) |
raw: Use helpers for the hlist_nulls variant.
hlist_nulls_add_head_rcu() and hlist_nulls_for_each_entry() have dedicated
macros for sk.
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/raw_diag.c')
-rw-r--r-- | net/ipv4/raw_diag.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/raw_diag.c b/net/ipv4/raw_diag.c index 5f208e840d85..ac4b6525d3c6 100644 --- a/net/ipv4/raw_diag.c +++ b/net/ipv4/raw_diag.c @@ -68,7 +68,7 @@ static struct sock *raw_sock_get(struct net *net, const struct inet_diag_req_v2 rcu_read_lock(); for (slot = 0; slot < RAW_HTABLE_SIZE; slot++) { hlist = &hashinfo->ht[slot]; - hlist_nulls_for_each_entry(sk, hnode, hlist, sk_nulls_node) { + sk_nulls_for_each(sk, hnode, hlist) { if (raw_lookup(net, sk, r)) { /* * Grab it and keep until we fill @@ -161,7 +161,7 @@ static void raw_diag_dump(struct sk_buff *skb, struct netlink_callback *cb, num = 0; hlist = &hashinfo->ht[slot]; - hlist_nulls_for_each_entry(sk, hnode, hlist, sk_nulls_node) { + sk_nulls_for_each(sk, hnode, hlist) { struct inet_sock *inet = inet_sk(sk); if (!net_eq(sock_net(sk), net)) |