Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Stefan Metzmacher and committed by
Steve French
649c4755 73dc52d2

-33
-1
fs/smb/server/connection.c
··· 562 562 ksmbd_tcp_destroy(); 563 563 ksmbd_rdma_stop_listening(); 564 564 stop_sessions(); 565 - ksmbd_rdma_destroy(); 566 565 mutex_unlock(&init_lock); 567 566 }
-30
fs/smb/server/transport_rdma.c
··· 85 85 struct smbdirect_socket *socket; 86 86 } smb_direct_ib_listener, smb_direct_iw_listener; 87 87 88 - static struct workqueue_struct *smb_direct_wq; 89 - 90 88 struct smb_direct_transport { 91 89 struct ksmbd_transport transport; 92 90 ··· 449 451 ret, ERR_PTR(ret)); 450 452 goto err; 451 453 } 452 - ret = smbdirect_socket_set_custom_workqueue(sc, smb_direct_wq); 453 - if (ret) { 454 - pr_err("Failed smbdirect_socket_set_custom_workqueue(): %d %1pe\n", 455 - ret, ERR_PTR(ret)); 456 - goto err; 457 - } 458 454 459 455 ret = smbdirect_socket_bind(sc, (struct sockaddr *)&sin); 460 456 if (ret) { ··· 492 500 .socket = NULL, 493 501 }; 494 502 495 - /* When a client is running out of send credits, the credits are 496 - * granted by the server's sending a packet using this queue. 497 - * This avoids the situation that a clients cannot send packets 498 - * for lack of credits 499 - */ 500 - smb_direct_wq = alloc_workqueue("ksmbd-smb_direct-wq", 501 - WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_PERCPU, 502 - 0); 503 - if (!smb_direct_wq) { 504 - ret = -ENOMEM; 505 - goto err; 506 - } 507 - 508 503 ret = smb_direct_listen(&smb_direct_ib_listener, 509 504 SMB_DIRECT_PORT_INFINIBAND); 510 505 if (ret) { ··· 515 536 return 0; 516 537 err: 517 538 ksmbd_rdma_stop_listening(); 518 - ksmbd_rdma_destroy(); 519 539 return ret; 520 540 } 521 541 ··· 522 544 { 523 545 smb_direct_listener_destroy(&smb_direct_ib_listener); 524 546 smb_direct_listener_destroy(&smb_direct_iw_listener); 525 - } 526 - 527 - void ksmbd_rdma_destroy(void) 528 - { 529 - if (smb_direct_wq) { 530 - destroy_workqueue(smb_direct_wq); 531 - smb_direct_wq = NULL; 532 - } 533 547 } 534 548 535 549 bool ksmbd_rdma_capable_netdev(struct net_device *netdev)
-2
fs/smb/server/transport_rdma.h
··· 14 14 #ifdef CONFIG_SMB_SERVER_SMBDIRECT 15 15 int ksmbd_rdma_init(void); 16 16 void ksmbd_rdma_stop_listening(void); 17 - void ksmbd_rdma_destroy(void); 18 17 bool ksmbd_rdma_capable_netdev(struct net_device *netdev); 19 18 void init_smbd_max_io_size(unsigned int sz); 20 19 unsigned int get_smbd_max_read_write_size(struct ksmbd_transport *kt); 21 20 #else 22 21 static inline int ksmbd_rdma_init(void) { return 0; } 23 22 static inline void ksmbd_rdma_stop_listening(void) { } 24 - static inline void ksmbd_rdma_destroy(void) { } 25 23 static inline bool ksmbd_rdma_capable_netdev(struct net_device *netdev) { return false; } 26 24 static inline void init_smbd_max_io_size(unsigned int sz) { } 27 25 static inline unsigned int get_smbd_max_read_write_size(struct ksmbd_transport *kt) { return 0; }