]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
smb: server: let smb_direct_disconnect_rdma_connection() disable all work but disconn...
authorStefan Metzmacher <metze@samba.org>
Thu, 28 Aug 2025 10:17:23 +0000 (12:17 +0200)
committerSteve French <stfrench@microsoft.com>
Sun, 28 Sep 2025 23:29:54 +0000 (18:29 -0500)
There's no point run these if we already know the connection
is broken.

Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
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>
fs/smb/server/transport_rdma.c

index 44fa0af21b453ddc2de41888e2aa9e1f77c525e2..cd4398ae8b9837282398fbd45de2f12ae0211313 100644 (file)
@@ -262,6 +262,15 @@ static void smb_direct_disconnect_rdma_work(struct work_struct *work)
 static void
 smb_direct_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->idle.immediate_work);
+       disable_delayed_work(&sc->idle.timer_work);
+
        if (sc->first_error == 0)
                sc->first_error = -ECONNABORTED;