Skip to content

Commit 649c475

Browse files
metze-sambasmfrench
authored andcommitted
smb: server: no longer use smbdirect_socket_set_custom_workqueue()
smbdirect.ko has global workqueues now, so we should use these default once. Cc: Namjae Jeon <linkinjeon@kernel.org> Cc: Steve French <smfrench@gmail.com> Cc: Tom Talpey <tom@talpey.com> 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>
1 parent 73dc52d commit 649c475

3 files changed

Lines changed: 0 additions & 33 deletions

File tree

fs/smb/server/connection.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,5 @@ void ksmbd_conn_transport_destroy(void)
562562
ksmbd_tcp_destroy();
563563
ksmbd_rdma_stop_listening();
564564
stop_sessions();
565-
ksmbd_rdma_destroy();
566565
mutex_unlock(&init_lock);
567566
}

fs/smb/server/transport_rdma.c

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ static struct smb_direct_listener {
8585
struct smbdirect_socket *socket;
8686
} smb_direct_ib_listener, smb_direct_iw_listener;
8787

88-
static struct workqueue_struct *smb_direct_wq;
89-
9088
struct smb_direct_transport {
9189
struct ksmbd_transport transport;
9290

@@ -451,12 +449,6 @@ static int smb_direct_listen(struct smb_direct_listener *listener,
451449
ret, ERR_PTR(ret));
452450
goto err;
453451
}
454-
ret = smbdirect_socket_set_custom_workqueue(sc, smb_direct_wq);
455-
if (ret) {
456-
pr_err("Failed smbdirect_socket_set_custom_workqueue(): %d %1pe\n",
457-
ret, ERR_PTR(ret));
458-
goto err;
459-
}
460452

461453
ret = smbdirect_socket_bind(sc, (struct sockaddr *)&sin);
462454
if (ret) {
@@ -500,19 +492,6 @@ int ksmbd_rdma_init(void)
500492
.socket = NULL,
501493
};
502494

503-
/* When a client is running out of send credits, the credits are
504-
* granted by the server's sending a packet using this queue.
505-
* This avoids the situation that a clients cannot send packets
506-
* for lack of credits
507-
*/
508-
smb_direct_wq = alloc_workqueue("ksmbd-smb_direct-wq",
509-
WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_PERCPU,
510-
0);
511-
if (!smb_direct_wq) {
512-
ret = -ENOMEM;
513-
goto err;
514-
}
515-
516495
ret = smb_direct_listen(&smb_direct_ib_listener,
517496
SMB_DIRECT_PORT_INFINIBAND);
518497
if (ret) {
@@ -536,7 +515,6 @@ int ksmbd_rdma_init(void)
536515
return 0;
537516
err:
538517
ksmbd_rdma_stop_listening();
539-
ksmbd_rdma_destroy();
540518
return ret;
541519
}
542520

@@ -546,14 +524,6 @@ void ksmbd_rdma_stop_listening(void)
546524
smb_direct_listener_destroy(&smb_direct_iw_listener);
547525
}
548526

549-
void ksmbd_rdma_destroy(void)
550-
{
551-
if (smb_direct_wq) {
552-
destroy_workqueue(smb_direct_wq);
553-
smb_direct_wq = NULL;
554-
}
555-
}
556-
557527
bool ksmbd_rdma_capable_netdev(struct net_device *netdev)
558528
{
559529
u8 node_type = smbdirect_netdev_rdma_capable_node_type(netdev);

fs/smb/server/transport_rdma.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@
1414
#ifdef CONFIG_SMB_SERVER_SMBDIRECT
1515
int ksmbd_rdma_init(void);
1616
void ksmbd_rdma_stop_listening(void);
17-
void ksmbd_rdma_destroy(void);
1817
bool ksmbd_rdma_capable_netdev(struct net_device *netdev);
1918
void init_smbd_max_io_size(unsigned int sz);
2019
unsigned int get_smbd_max_read_write_size(struct ksmbd_transport *kt);
2120
#else
2221
static inline int ksmbd_rdma_init(void) { return 0; }
2322
static inline void ksmbd_rdma_stop_listening(void) { }
24-
static inline void ksmbd_rdma_destroy(void) { }
2523
static inline bool ksmbd_rdma_capable_netdev(struct net_device *netdev) { return false; }
2624
static inline void init_smbd_max_io_size(unsigned int sz) { }
2725
static inline unsigned int get_smbd_max_read_write_size(struct ksmbd_transport *kt) { return 0; }

0 commit comments

Comments
 (0)