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>
This commit is contained in:
Stefan Metzmacher 2025-08-28 12:15:11 +02:00 committed by Steve French
parent 98a1cdca35
commit 0cb7ed37af

View File

@ -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;