summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2025-08-28 13:15:11 +0300
committerSteve French <stfrench@microsoft.com>2025-09-29 02:29:51 +0300
commit0cb7ed37af614bbda39dab3d13f0639458d77cae (patch)
tree7b6b64a6ffe1008710fc391925495441a33cc914
parent98a1cdca35eac55407c76067cdffd19aade0026c (diff)
downloadlinux-0cb7ed37af614bbda39dab3d13f0639458d77cae.tar.xz
smb: client: let smbd_disconnect_rdma_connection() disable all work but disconnect_work
There's no point run these if we already know the connection is broken. Cc: Steve French <smfrench@gmail.com> Cc: Tom Talpey <tom@talpey.com> Cc: Long Li <longli@microsoft.com> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Steve French <stfrench@microsoft.com>
-rw-r--r--fs/smb/client/smbdirect.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c
index 86d32bd5f113..155d69745adf 100644
--- a/fs/smb/client/smbdirect.c
+++ b/fs/smb/client/smbdirect.c
@@ -220,6 +220,16 @@ static void smbd_disconnect_rdma_work(struct work_struct *work)
static void smbd_disconnect_rdma_connection(struct smbdirect_socket *sc)
{
+ /*
+ * make sure other work (than disconnect_work) is
+ * not queued again but here we don't block and avoid
+ * disable[_delayed]_work_sync()
+ */
+ disable_work(&sc->recv_io.posted.refill_work);
+ disable_work(&sc->mr_io.recovery_work);
+ disable_work(&sc->idle.immediate_work);
+ disable_delayed_work(&sc->idle.timer_work);
+
if (sc->first_error == 0)
sc->first_error = -ECONNABORTED;