Skip to content

Commit 410da1e

Browse files
committed
net/smc: fix up merge error with poll changes
My networking merge (commit 4e33d7d: "Pull networking fixes from David Miller") got the poll() handling conflict wrong for af_smc. The conflict between my a11e1d4 ("Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL") and Ursula Braun's 24ac3a0 ("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: Ursula Braun <[email protected]> Cc: David Miller <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent d0fbad0 commit 410da1e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/smc/af_smc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1345,6 +1345,8 @@ static __poll_t smc_poll(struct file *file, struct socket *sock,
13451345
if (sk->sk_err)
13461346
mask |= EPOLLERR;
13471347
} else {
1348+
if (sk->sk_state != SMC_CLOSED)
1349+
sock_poll_wait(file, sk_sleep(sk), wait);
13481350
if (sk->sk_err)
13491351
mask |= EPOLLERR;
13501352
if ((sk->sk_shutdown == SHUTDOWN_MASK) ||
@@ -1370,7 +1372,6 @@ static __poll_t smc_poll(struct file *file, struct socket *sock,
13701372
}
13711373
if (smc->conn.urg_state == SMC_URG_VALID)
13721374
mask |= EPOLLPRI;
1373-
13741375
}
13751376

13761377
return mask;

0 commit comments

Comments
 (0)