Skip to content

Commit c0129a0

Browse files
congwangdavem330
authored andcommitted
smc: convert to ->poll_mask
smc->clcsock is an internal TCP socket, after TCP socket converts to ->poll_mask, ->poll doesn't exist any more. So just convert smc socket to ->poll_mask too. Fixes: 2c7d3da ("net/tcp: convert to ->poll_mask") Reported-by: [email protected] Cc: Christoph Hellwig <[email protected]> Cc: Ursula Braun <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 760a6ed commit c0129a0

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

net/smc/af_smc.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,8 +1273,7 @@ static __poll_t smc_accept_poll(struct sock *parent)
12731273
return mask;
12741274
}
12751275

1276-
static __poll_t smc_poll(struct file *file, struct socket *sock,
1277-
poll_table *wait)
1276+
static __poll_t smc_poll_mask(struct socket *sock, __poll_t events)
12781277
{
12791278
struct sock *sk = sock->sk;
12801279
__poll_t mask = 0;
@@ -1290,7 +1289,7 @@ static __poll_t smc_poll(struct file *file, struct socket *sock,
12901289
if ((sk->sk_state == SMC_INIT) || smc->use_fallback) {
12911290
/* delegate to CLC child sock */
12921291
release_sock(sk);
1293-
mask = smc->clcsock->ops->poll(file, smc->clcsock, wait);
1292+
mask = smc->clcsock->ops->poll_mask(smc->clcsock, events);
12941293
lock_sock(sk);
12951294
sk->sk_err = smc->clcsock->sk->sk_err;
12961295
if (sk->sk_err) {
@@ -1308,11 +1307,6 @@ static __poll_t smc_poll(struct file *file, struct socket *sock,
13081307
}
13091308
}
13101309
} else {
1311-
if (sk->sk_state != SMC_CLOSED) {
1312-
release_sock(sk);
1313-
sock_poll_wait(file, sk_sleep(sk), wait);
1314-
lock_sock(sk);
1315-
}
13161310
if (sk->sk_err)
13171311
mask |= EPOLLERR;
13181312
if ((sk->sk_shutdown == SHUTDOWN_MASK) ||
@@ -1625,7 +1619,7 @@ static const struct proto_ops smc_sock_ops = {
16251619
.socketpair = sock_no_socketpair,
16261620
.accept = smc_accept,
16271621
.getname = smc_getname,
1628-
.poll = smc_poll,
1622+
.poll_mask = smc_poll_mask,
16291623
.ioctl = smc_ioctl,
16301624
.listen = smc_listen,
16311625
.shutdown = smc_shutdown,

0 commit comments

Comments
 (0)