Commit 410da1e1 authored by Linus Torvalds's avatar Linus Torvalds

net/smc: fix up merge error with poll changes

My networking merge (commit 4e33d7d4: "Pull networking fixes from
David Miller") got the poll() handling conflict wrong for af_smc.

The conflict between my a11e1d43 ("Revert changes to convert to
->poll_mask() and aio IOCB_CMD_POLL") and Ursula Braun's 24ac3a08
("net/smc: rebuild nonblocking connect") should have left the call to
sock_poll_wait() in place, just without the socket lock release/retake.

And I really should have realized that.  But happily, I at least asked
Ursula to double-check the merge, and she set me right.

This also fixes an incidental whitespace issue nearby that annoyed me
while looking at this.
Pointed-out-by: default avatarUrsula Braun <ubraun@linux.ibm.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d0fbad0a
...@@ -1345,6 +1345,8 @@ static __poll_t smc_poll(struct file *file, struct socket *sock, ...@@ -1345,6 +1345,8 @@ static __poll_t smc_poll(struct file *file, struct socket *sock,
if (sk->sk_err) if (sk->sk_err)
mask |= EPOLLERR; mask |= EPOLLERR;
} else { } else {
if (sk->sk_state != SMC_CLOSED)
sock_poll_wait(file, sk_sleep(sk), wait);
if (sk->sk_err) if (sk->sk_err)
mask |= EPOLLERR; mask |= EPOLLERR;
if ((sk->sk_shutdown == SHUTDOWN_MASK) || if ((sk->sk_shutdown == SHUTDOWN_MASK) ||
...@@ -1370,7 +1372,6 @@ static __poll_t smc_poll(struct file *file, struct socket *sock, ...@@ -1370,7 +1372,6 @@ static __poll_t smc_poll(struct file *file, struct socket *sock,
} }
if (smc->conn.urg_state == SMC_URG_VALID) if (smc->conn.urg_state == SMC_URG_VALID)
mask |= EPOLLPRI; mask |= EPOLLPRI;
} }
return mask; return mask;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment