mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
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>
This commit is contained in:
parent
73dc52d294
commit
649c47559a
|
|
@ -562,6 +562,5 @@ void ksmbd_conn_transport_destroy(void)
|
|||
ksmbd_tcp_destroy();
|
||||
ksmbd_rdma_stop_listening();
|
||||
stop_sessions();
|
||||
ksmbd_rdma_destroy();
|
||||
mutex_unlock(&init_lock);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,8 +85,6 @@ static struct smb_direct_listener {
|
|||
struct smbdirect_socket *socket;
|
||||
} smb_direct_ib_listener, smb_direct_iw_listener;
|
||||
|
||||
static struct workqueue_struct *smb_direct_wq;
|
||||
|
||||
struct smb_direct_transport {
|
||||
struct ksmbd_transport transport;
|
||||
|
||||
|
|
@ -451,12 +449,6 @@ static int smb_direct_listen(struct smb_direct_listener *listener,
|
|||
ret, ERR_PTR(ret));
|
||||
goto err;
|
||||
}
|
||||
ret = smbdirect_socket_set_custom_workqueue(sc, smb_direct_wq);
|
||||
if (ret) {
|
||||
pr_err("Failed smbdirect_socket_set_custom_workqueue(): %d %1pe\n",
|
||||
ret, ERR_PTR(ret));
|
||||
goto err;
|
||||
}
|
||||
|
||||
ret = smbdirect_socket_bind(sc, (struct sockaddr *)&sin);
|
||||
if (ret) {
|
||||
|
|
@ -500,19 +492,6 @@ int ksmbd_rdma_init(void)
|
|||
.socket = NULL,
|
||||
};
|
||||
|
||||
/* When a client is running out of send credits, the credits are
|
||||
* granted by the server's sending a packet using this queue.
|
||||
* This avoids the situation that a clients cannot send packets
|
||||
* for lack of credits
|
||||
*/
|
||||
smb_direct_wq = alloc_workqueue("ksmbd-smb_direct-wq",
|
||||
WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_PERCPU,
|
||||
0);
|
||||
if (!smb_direct_wq) {
|
||||
ret = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
|
||||
ret = smb_direct_listen(&smb_direct_ib_listener,
|
||||
SMB_DIRECT_PORT_INFINIBAND);
|
||||
if (ret) {
|
||||
|
|
@ -536,7 +515,6 @@ int ksmbd_rdma_init(void)
|
|||
return 0;
|
||||
err:
|
||||
ksmbd_rdma_stop_listening();
|
||||
ksmbd_rdma_destroy();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -546,14 +524,6 @@ void ksmbd_rdma_stop_listening(void)
|
|||
smb_direct_listener_destroy(&smb_direct_iw_listener);
|
||||
}
|
||||
|
||||
void ksmbd_rdma_destroy(void)
|
||||
{
|
||||
if (smb_direct_wq) {
|
||||
destroy_workqueue(smb_direct_wq);
|
||||
smb_direct_wq = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
bool ksmbd_rdma_capable_netdev(struct net_device *netdev)
|
||||
{
|
||||
u8 node_type = smbdirect_netdev_rdma_capable_node_type(netdev);
|
||||
|
|
|
|||
|
|
@ -14,14 +14,12 @@
|
|||
#ifdef CONFIG_SMB_SERVER_SMBDIRECT
|
||||
int ksmbd_rdma_init(void);
|
||||
void ksmbd_rdma_stop_listening(void);
|
||||
void ksmbd_rdma_destroy(void);
|
||||
bool ksmbd_rdma_capable_netdev(struct net_device *netdev);
|
||||
void init_smbd_max_io_size(unsigned int sz);
|
||||
unsigned int get_smbd_max_read_write_size(struct ksmbd_transport *kt);
|
||||
#else
|
||||
static inline int ksmbd_rdma_init(void) { return 0; }
|
||||
static inline void ksmbd_rdma_stop_listening(void) { }
|
||||
static inline void ksmbd_rdma_destroy(void) { }
|
||||
static inline bool ksmbd_rdma_capable_netdev(struct net_device *netdev) { return false; }
|
||||
static inline void init_smbd_max_io_size(unsigned int sz) { }
|
||||
static inline unsigned int get_smbd_max_read_write_size(struct ksmbd_transport *kt) { return 0; }
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user