@@ -2832,17 +2832,16 @@ static int smc_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
return rc;
}
-static __poll_t smc_accept_poll(struct sock *parent)
+static inline bool smc_accept_queue_empty(struct sock *sk)
{
- struct smc_sock *isk = smc_sk(parent);
- __poll_t mask = 0;
-
- spin_lock(&isk->accept_q_lock);
- if (!list_empty(&isk->accept_q))
- mask = EPOLLIN | EPOLLRDNORM;
- spin_unlock(&isk->accept_q_lock);
+ return list_empty(&smc_sk(sk)->accept_q);
+}
- return mask;
+static __poll_t smc_accept_poll(struct sock *parent)
+{
+ if (!smc_accept_queue_empty(parent))
+ return EPOLLIN | EPOLLRDNORM;
+ return 0;
}
static __poll_t smc_poll(struct file *file, struct socket *sock,