summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDust Li <dust.li@linux.alibaba.com>2022-03-01 12:43:59 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-13 21:59:25 +0300
commit7f48521172fb63b9948e86987462cea62564fc2b (patch)
treece84c5b79e2c5ed8765a525c2b78180a530096d0
parent20633216ded00e0580582ad00bbf4520c58caff8 (diff)
downloadlinux-7f48521172fb63b9948e86987462cea62564fc2b.tar.xz
net/smc: send directly on setting TCP_NODELAY
commit b70a5cc045197aad9c159042621baf3c015f6cc7 upstream. In commit ea785a1a573b("net/smc: Send directly when TCP_CORK is cleared"), we don't use delayed work to implement cork. This patch use the same algorithm, removes the delayed work when setting TCP_NODELAY and send directly in setsockopt(). This also makes the TCP_NODELAY the same as TCP. Cc: Tony Lu <tonylu@linux.alibaba.com> Signed-off-by: Dust Li <dust.li@linux.alibaba.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--net/smc/af_smc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
index 183b122807b6..fa8897497dcc 100644
--- a/net/smc/af_smc.c
+++ b/net/smc/af_smc.c
@@ -2419,8 +2419,8 @@ static int smc_setsockopt(struct socket *sock, int level, int optname,
sk->sk_state != SMC_CLOSED) {
if (val) {
SMC_STAT_INC(smc, ndly_cnt);
- mod_delayed_work(smc->conn.lgr->tx_wq,
- &smc->conn.tx_work, 0);
+ smc_tx_pending(&smc->conn);
+ cancel_delayed_work(&smc->conn.tx_work);
}
}
break;