diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/smc/smc_tx.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/smc/smc_tx.c b/net/smc/smc_tx.c index d8366ed51757..28361aef9982 100644 --- a/net/smc/smc_tx.c +++ b/net/smc/smc_tx.c @@ -75,13 +75,11 @@ static int smc_tx_wait(struct smc_sock *smc, int flags) DEFINE_WAIT_FUNC(wait, woken_wake_function); struct smc_connection *conn = &smc->conn; struct sock *sk = &smc->sk; - bool noblock; long timeo; int rc = 0; /* similar to sk_stream_wait_memory */ timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT); - noblock = timeo ? false : true; add_wait_queue(sk_sleep(sk), &wait); while (1) { sk_set_bit(SOCKWQ_ASYNC_NOSPACE, sk); @@ -96,8 +94,8 @@ static int smc_tx_wait(struct smc_sock *smc, int flags) break; } if (!timeo) { - if (noblock) - set_bit(SOCK_NOSPACE, &sk->sk_socket->flags); + /* ensure EPOLLOUT is subsequently generated */ + set_bit(SOCK_NOSPACE, &sk->sk_socket->flags); rc = -EAGAIN; break; } |