From: Stefan Metzmacher Date: Thu, 28 Aug 2025 10:15:11 +0000 (+0200) Subject: smb: client: let smbd_disconnect_rdma_connection() disable all work but disconnect_work X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0cb7ed37af614bbda39dab3d13f0639458d77cae;p=thirdparty%2Fkernel%2Fstable.git 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 Cc: Tom Talpey Cc: Long Li Acked-by: Namjae Jeon Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher Signed-off-by: Steve French --- diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c index 86d32bd5f1136..155d69745adf1 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;