diff options
Diffstat (limited to 'net/ipv4/inet_diag.c')
-rw-r--r-- | net/ipv4/inet_diag.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index 564230dabcb8..41b36720e977 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c | |||
@@ -778,18 +778,19 @@ skip_listen_ht: | |||
778 | struct inet_ehash_bucket *head = &hashinfo->ehash[i]; | 778 | struct inet_ehash_bucket *head = &hashinfo->ehash[i]; |
779 | rwlock_t *lock = inet_ehash_lockp(hashinfo, i); | 779 | rwlock_t *lock = inet_ehash_lockp(hashinfo, i); |
780 | struct sock *sk; | 780 | struct sock *sk; |
781 | struct hlist_node *node; | 781 | struct hlist_nulls_node *node; |
782 | 782 | ||
783 | num = 0; | 783 | num = 0; |
784 | 784 | ||
785 | if (hlist_empty(&head->chain) && hlist_empty(&head->twchain)) | 785 | if (hlist_nulls_empty(&head->chain) && |
786 | hlist_nulls_empty(&head->twchain)) | ||
786 | continue; | 787 | continue; |
787 | 788 | ||
788 | if (i > s_i) | 789 | if (i > s_i) |
789 | s_num = 0; | 790 | s_num = 0; |
790 | 791 | ||
791 | read_lock_bh(lock); | 792 | read_lock_bh(lock); |
792 | sk_for_each(sk, node, &head->chain) { | 793 | sk_nulls_for_each(sk, node, &head->chain) { |
793 | struct inet_sock *inet = inet_sk(sk); | 794 | struct inet_sock *inet = inet_sk(sk); |
794 | 795 | ||
795 | if (num < s_num) | 796 | if (num < s_num) |