]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
smb: client: no longer use smbdirect_socket_set_custom_workqueue()
authorStefan Metzmacher <metze@samba.org>
Tue, 4 Nov 2025 16:31:25 +0000 (17:31 +0100)
committerSteve French <stfrench@microsoft.com>
Thu, 16 Apr 2026 02:58:24 +0000 (21:58 -0500)
smbdirect.ko has global workqueues now, so we should use these
default once.

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>
fs/smb/client/smbdirect.c
fs/smb/client/smbdirect.h

index 73fc86312bbf43ccd5273e8378797832e0bc8906..9e67adcdc7d3e6f4f93de37a5faa39eb207110bc 100644 (file)
@@ -211,7 +211,6 @@ void smbd_destroy(struct TCP_Server_Info *server)
 
        smbdirect_socket_release(info->socket);
 
-       destroy_workqueue(info->workqueue);
        kfree(info);
        server->smbd_conn = NULL;
 }
@@ -261,7 +260,6 @@ static struct smbd_connection *_smbd_get_connection(
        struct smbdirect_socket_parameters *sp;
        __be16 *sport;
        u64 port_flags = 0;
-       char wq_name[80];
        int ret;
 
        switch (port) {
@@ -306,10 +304,6 @@ static struct smbd_connection *_smbd_get_connection(
        info = kzalloc_obj(*info);
        if (!info)
                return NULL;
-       scnprintf(wq_name, ARRAY_SIZE(wq_name), "smbd_%p", info);
-       info->workqueue = create_workqueue(wq_name);
-       if (!info->workqueue)
-               goto create_wq_failed;
        ret = smbdirect_socket_create_kern(net, &sc);
        if (ret)
                goto socket_init_failed;
@@ -320,9 +314,6 @@ static struct smbd_connection *_smbd_get_connection(
        ret = smbdirect_socket_set_kernel_settings(sc, IB_POLL_SOFTIRQ, GFP_KERNEL);
        if (ret)
                goto set_settings_failed;
-       ret = smbdirect_socket_set_custom_workqueue(sc, info->workqueue);
-       if (ret)
-               goto set_workqueue_failed;
 
        if (dstaddr->sa_family == AF_INET6)
                sport = &((struct sockaddr_in6 *)dstaddr)->sin6_port;
@@ -342,13 +333,10 @@ static struct smbd_connection *_smbd_get_connection(
        return info;
 
 connect_failed:
-set_workqueue_failed:
 set_settings_failed:
 set_params_failed:
        smbdirect_socket_release(sc);
 socket_init_failed:
-       destroy_workqueue(info->workqueue);
-create_wq_failed:
        kfree(info);
        return NULL;
 }
index bd03ae72e9c82e20e85b81e2acc5cf16bcdf9cfa..0017d5b2de449abf2a1d6409da9b122e2f502e16 100644 (file)
@@ -25,7 +25,6 @@ extern int smbd_receive_credit_max;
 
 struct smbd_connection {
        struct smbdirect_socket *socket;
-       struct workqueue_struct *workqueue;
 };
 
 /* Create a SMBDirect session */