summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2025-08-28 14:38:29 +0300
committerSteve French <stfrench@microsoft.com>2026-04-16 05:58:18 +0300
commit8e342e68992e93db0c999f892e7aa1eb35c67709 (patch)
treece5bfd2ef45f57515f4a2a7b5af516e5cd3905b1
parent1593f5d004f5f3812ba175f4253fba07853db24e (diff)
downloadlinux-8e342e68992e93db0c999f892e7aa1eb35c67709.tar.xz
smb: smbdirect: set SMBDIRECT_KEEPALIVE_NONE before disable_delayed_work(&sc->idle.timer_work);
This avoids a potential confusing log message from smbdirect_connection_idle_timer_work() if it's already running. This is a very small race windows and not really needed, but it feels better when reading the code. Cc: Steve French <smfrench@gmail.com> Cc: Tom Talpey <tom@talpey.com> Cc: Long Li <longli@microsoft.com> Cc: 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> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
-rw-r--r--fs/smb/common/smbdirect/smbdirect_socket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/smb/common/smbdirect/smbdirect_socket.c b/fs/smb/common/smbdirect/smbdirect_socket.c
index 34971c2700ee..b5ce5f6443f6 100644
--- a/fs/smb/common/smbdirect/smbdirect_socket.c
+++ b/fs/smb/common/smbdirect/smbdirect_socket.c
@@ -106,6 +106,7 @@ static void __smbdirect_socket_schedule_cleanup(struct smbdirect_socket *sc,
disable_work(&sc->recv_io.posted.refill_work);
disable_work(&sc->mr_io.recovery_work);
disable_work(&sc->idle.immediate_work);
+ sc->idle.keepalive = SMBDIRECT_KEEPALIVE_NONE;
disable_delayed_work(&sc->idle.timer_work);
switch (sc->status) {
@@ -191,6 +192,7 @@ static void smbdirect_socket_cleanup_work(struct work_struct *work)
disable_work(&sc->recv_io.posted.refill_work);
disable_work(&sc->mr_io.recovery_work);
disable_work(&sc->idle.immediate_work);
+ sc->idle.keepalive = SMBDIRECT_KEEPALIVE_NONE;
disable_delayed_work(&sc->idle.timer_work);
switch (sc->status) {