diff options
author | Ursula Braun <ubraun@linux.ibm.com> | 2018-05-15 17:04:54 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-16 11:49:19 -0400 |
commit | 569bc643656826d5305aebdc5d5500c99881b2e5 (patch) | |
tree | 374767c95aa730325e9f13226019d36cad6008a1 /net/smc | |
parent | 7d6541fba19c970cf5ebbc2c56b0fb04eab89f98 (diff) | |
download | linux-stable-569bc643656826d5305aebdc5d5500c99881b2e5.tar.gz linux-stable-569bc643656826d5305aebdc5d5500c99881b2e5.tar.bz2 linux-stable-569bc643656826d5305aebdc5d5500c99881b2e5.zip |
net/smc: no tx work trigger for fallback sockets
If TCP_NODELAY is set or TCP_CORK is reset, setsockopt triggers the
tx worker. This does not make sense, if the SMC socket switched to
the TCP fallback when the connection is created. This patch adds
the additional check for the fallback case.
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc')
-rw-r--r-- | net/smc/af_smc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index 17688a02035b..83403be46a4a 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c @@ -1353,14 +1353,14 @@ static int smc_setsockopt(struct socket *sock, int level, int optname, break; case TCP_NODELAY: if (sk->sk_state != SMC_INIT && sk->sk_state != SMC_LISTEN) { - if (val) + if (val && !smc->use_fallback) mod_delayed_work(system_wq, &smc->conn.tx_work, 0); } break; case TCP_CORK: if (sk->sk_state != SMC_INIT && sk->sk_state != SMC_LISTEN) { - if (!val) + if (!val && !smc->use_fallback) mod_delayed_work(system_wq, &smc->conn.tx_work, 0); } |