]> Git Repo - linux.git/blobdiff - net/unix/af_unix.c
net: dsa: sja1105: Implement state machine for TAS with PTP clock source
[linux.git] / net / unix / af_unix.c
index 67e87db5877f1132b52b0c93d349983873fec38f..193cba2d777b26b2f102227b9bd7b7c2580bf156 100644 (file)
@@ -284,11 +284,9 @@ static struct sock *__unix_find_socket_byname(struct net *net,
 
                if (u->addr->len == len &&
                    !memcmp(u->addr->name, sunname, len))
-                       goto found;
+                       return s;
        }
-       s = NULL;
-found:
-       return s;
+       return NULL;
 }
 
 static inline struct sock *unix_find_socket_byname(struct net *net,
@@ -2599,7 +2597,7 @@ static __poll_t unix_poll(struct file *file, struct socket *sock, poll_table *wa
                mask |= EPOLLRDHUP | EPOLLIN | EPOLLRDNORM;
 
        /* readable? */
-       if (!skb_queue_empty(&sk->sk_receive_queue))
+       if (!skb_queue_empty_lockless(&sk->sk_receive_queue))
                mask |= EPOLLIN | EPOLLRDNORM;
 
        /* Connection-based need to check for termination and startup */
@@ -2628,7 +2626,7 @@ static __poll_t unix_dgram_poll(struct file *file, struct socket *sock,
        mask = 0;
 
        /* exceptional events? */
-       if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue))
+       if (sk->sk_err || !skb_queue_empty_lockless(&sk->sk_error_queue))
                mask |= EPOLLERR |
                        (sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? EPOLLPRI : 0);
 
@@ -2638,7 +2636,7 @@ static __poll_t unix_dgram_poll(struct file *file, struct socket *sock,
                mask |= EPOLLHUP;
 
        /* readable? */
-       if (!skb_queue_empty(&sk->sk_receive_queue))
+       if (!skb_queue_empty_lockless(&sk->sk_receive_queue))
                mask |= EPOLLIN | EPOLLRDNORM;
 
        /* Connection-based need to check for termination and startup */
This page took 0.032247 seconds and 4 git commands to generate.