[PATCH v2 099/127] smb: server: make use of smbdirect_connection_idle_timer_work()
Stefan Metzmacher
metze at samba.org
Wed Oct 29 13:21:17 UTC 2025
This is basically a copy of smb_direct_idle_connection_timer().
The only difference is that we had no logging before.
Note smbdirect_socket_prepare_create() already calls INIT_DELAYED_WORK().
Cc: Namjae Jeon <linkinjeon at kernel.org>
Cc: Steve French <smfrench at gmail.com>
Cc: Tom Talpey <tom at talpey.com>
Cc: linux-cifs at vger.kernel.org
Cc: samba-technical at lists.samba.org
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Signed-off-by: Steve French <stfrench at microsoft.com>
---
fs/smb/server/transport_rdma.c | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/fs/smb/server/transport_rdma.c b/fs/smb/server/transport_rdma.c
index fdf8ac7d5d34..886a350819bf 100644
--- a/fs/smb/server/transport_rdma.c
+++ b/fs/smb/server/transport_rdma.c
@@ -226,30 +226,6 @@ static void smb_direct_send_immediate_work(struct work_struct *work)
smb_direct_post_send_data(sc, NULL, NULL, 0, 0);
}
-static void smb_direct_idle_connection_timer(struct work_struct *work)
-{
- struct smbdirect_socket *sc =
- container_of(work, struct smbdirect_socket, idle.timer_work.work);
- struct smbdirect_socket_parameters *sp = &sc->parameters;
-
- if (sc->idle.keepalive != SMBDIRECT_KEEPALIVE_NONE) {
- smbdirect_connection_schedule_disconnect(sc, -ETIMEDOUT);
- return;
- }
-
- if (sc->status != SMBDIRECT_SOCKET_CONNECTED)
- return;
-
- /*
- * Now use the keepalive timeout (instead of keepalive interval)
- * in order to wait for a response
- */
- sc->idle.keepalive = SMBDIRECT_KEEPALIVE_PENDING;
- mod_delayed_work(sc->workqueue, &sc->idle.timer_work,
- msecs_to_jiffies(sp->keepalive_timeout_msec));
- queue_work(sc->workqueue, &sc->idle.immediate_work);
-}
-
static struct smb_direct_transport *alloc_transport(struct rdma_cm_id *cm_id)
{
struct smb_direct_transport *t;
@@ -292,8 +268,6 @@ static struct smb_direct_transport *alloc_transport(struct rdma_cm_id *cm_id)
sc->ib.dev = sc->rdma.cm_id->device;
- INIT_DELAYED_WORK(&sc->idle.timer_work, smb_direct_idle_connection_timer);
-
conn = ksmbd_conn_alloc();
if (!conn)
goto err;
--
2.43.0
More information about the samba-technical
mailing list