aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/diag.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/unix/diag.c')
-rw-r--r--net/unix/diag.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/unix/diag.c b/net/unix/diag.c
index 5ac19dc1d5e4..d591091603bf 100644
--- a/net/unix/diag.c
+++ b/net/unix/diag.c
@@ -192,10 +192,9 @@ static int unix_diag_dump(struct sk_buff *skb, struct netlink_callback *cb)
192 slot < ARRAY_SIZE(unix_socket_table); 192 slot < ARRAY_SIZE(unix_socket_table);
193 s_num = 0, slot++) { 193 s_num = 0, slot++) {
194 struct sock *sk; 194 struct sock *sk;
195 struct hlist_node *node;
196 195
197 num = 0; 196 num = 0;
198 sk_for_each(sk, node, &unix_socket_table[slot]) { 197 sk_for_each(sk, &unix_socket_table[slot]) {
199 if (!net_eq(sock_net(sk), net)) 198 if (!net_eq(sock_net(sk), net))
200 continue; 199 continue;
201 if (num < s_num) 200 if (num < s_num)
@@ -226,9 +225,7 @@ static struct sock *unix_lookup_by_ino(int ino)
226 225
227 spin_lock(&unix_table_lock); 226 spin_lock(&unix_table_lock);
228 for (i = 0; i < ARRAY_SIZE(unix_socket_table); i++) { 227 for (i = 0; i < ARRAY_SIZE(unix_socket_table); i++) {
229 struct hlist_node *node; 228 sk_for_each(sk, &unix_socket_table[i])
230
231 sk_for_each(sk, node, &unix_socket_table[i])
232 if (ino == sock_i_ino(sk)) { 229 if (ino == sock_i_ino(sk)) {
233 sock_hold(sk); 230 sock_hold(sk);
234 spin_unlock(&unix_table_lock); 231 spin_unlock(&unix_table_lock);