File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -504,7 +504,8 @@ void ksmbd_conn_transport_destroy(void)
504
504
{
505
505
mutex_lock (& init_lock );
506
506
ksmbd_tcp_destroy ();
507
- ksmbd_rdma_destroy ();
507
+ ksmbd_rdma_stop_listening ();
508
508
stop_sessions ();
509
+ ksmbd_rdma_destroy ();
509
510
mutex_unlock (& init_lock );
510
511
}
Original file line number Diff line number Diff line change @@ -2194,7 +2194,7 @@ int ksmbd_rdma_init(void)
2194
2194
return 0 ;
2195
2195
}
2196
2196
2197
- void ksmbd_rdma_destroy (void )
2197
+ void ksmbd_rdma_stop_listening (void )
2198
2198
{
2199
2199
if (!smb_direct_listener .cm_id )
2200
2200
return ;
@@ -2203,7 +2203,10 @@ void ksmbd_rdma_destroy(void)
2203
2203
rdma_destroy_id (smb_direct_listener .cm_id );
2204
2204
2205
2205
smb_direct_listener .cm_id = NULL ;
2206
+ }
2206
2207
2208
+ void ksmbd_rdma_destroy (void )
2209
+ {
2207
2210
if (smb_direct_wq ) {
2208
2211
destroy_workqueue (smb_direct_wq );
2209
2212
smb_direct_wq = NULL ;
Original file line number Diff line number Diff line change @@ -54,13 +54,15 @@ struct smb_direct_data_transfer {
54
54
55
55
#ifdef CONFIG_SMB_SERVER_SMBDIRECT
56
56
int ksmbd_rdma_init (void );
57
+ void ksmbd_rdma_stop_listening (void );
57
58
void ksmbd_rdma_destroy (void );
58
59
bool ksmbd_rdma_capable_netdev (struct net_device * netdev );
59
60
void init_smbd_max_io_size (unsigned int sz );
60
61
unsigned int get_smbd_max_read_write_size (void );
61
62
#else
62
63
static inline int ksmbd_rdma_init (void ) { return 0 ; }
63
- static inline int ksmbd_rdma_destroy (void ) { return 0 ; }
64
+ static inline void ksmbd_rdma_stop_listening (void ) { }
65
+ static inline void ksmbd_rdma_destroy (void ) { }
64
66
static inline bool ksmbd_rdma_capable_netdev (struct net_device * netdev ) { return false; }
65
67
static inline void init_smbd_max_io_size (unsigned int sz ) { }
66
68
static inline unsigned int get_smbd_max_read_write_size (void ) { return 0 ; }
You can’t perform that action at this time.
0 commit comments