File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -416,13 +416,7 @@ static void stop_sessions(void)
416416again :
417417 down_read (& conn_list_lock );
418418 list_for_each_entry (conn , & conn_list , conns_list ) {
419- struct task_struct * task ;
420-
421419 t = conn -> transport ;
422- task = t -> handler ;
423- if (task )
424- ksmbd_debug (CONN , "Stop session handler %s/%d\n" ,
425- task -> comm , task_pid_nr (task ));
426420 ksmbd_conn_set_exiting (conn );
427421 if (t -> ops -> shutdown ) {
428422 up_read (& conn_list_lock );
Original file line number Diff line number Diff line change @@ -135,7 +135,6 @@ struct ksmbd_transport_ops {
135135struct ksmbd_transport {
136136 struct ksmbd_conn * conn ;
137137 struct ksmbd_transport_ops * ops ;
138- struct task_struct * handler ;
139138};
140139
141140#define KSMBD_TCP_RECV_TIMEOUT (7 * HZ)
Original file line number Diff line number Diff line change @@ -2039,6 +2039,7 @@ static bool rdma_frwr_is_supported(struct ib_device_attr *attrs)
20392039static int smb_direct_handle_connect_request (struct rdma_cm_id * new_cm_id )
20402040{
20412041 struct smb_direct_transport * t ;
2042+ struct task_struct * handler ;
20422043 int ret ;
20432044
20442045 if (!rdma_frwr_is_supported (& new_cm_id -> device -> attrs )) {
@@ -2056,11 +2057,11 @@ static int smb_direct_handle_connect_request(struct rdma_cm_id *new_cm_id)
20562057 if (ret )
20572058 goto out_err ;
20582059
2059- KSMBD_TRANS ( t ) -> handler = kthread_run (ksmbd_conn_handler_loop ,
2060- KSMBD_TRANS (t )-> conn , "ksmbd:r%u" ,
2061- smb_direct_port );
2062- if (IS_ERR (KSMBD_TRANS ( t ) -> handler )) {
2063- ret = PTR_ERR (KSMBD_TRANS ( t ) -> handler );
2060+ handler = kthread_run (ksmbd_conn_handler_loop ,
2061+ KSMBD_TRANS (t )-> conn , "ksmbd:r%u" ,
2062+ smb_direct_port );
2063+ if (IS_ERR (handler )) {
2064+ ret = PTR_ERR (handler );
20642065 pr_err ("Can't start thread\n" );
20652066 goto out_err ;
20662067 }
Original file line number Diff line number Diff line change @@ -185,6 +185,7 @@ static int ksmbd_tcp_new_connection(struct socket *client_sk)
185185 struct sockaddr * csin ;
186186 int rc = 0 ;
187187 struct tcp_transport * t ;
188+ struct task_struct * handler ;
188189
189190 t = alloc_transport (client_sk );
190191 if (!t ) {
@@ -199,13 +200,13 @@ static int ksmbd_tcp_new_connection(struct socket *client_sk)
199200 goto out_error ;
200201 }
201202
202- KSMBD_TRANS ( t ) -> handler = kthread_run (ksmbd_conn_handler_loop ,
203- KSMBD_TRANS (t )-> conn ,
204- "ksmbd:%u" ,
205- ksmbd_tcp_get_port (csin ));
206- if (IS_ERR (KSMBD_TRANS ( t ) -> handler )) {
203+ handler = kthread_run (ksmbd_conn_handler_loop ,
204+ KSMBD_TRANS (t )-> conn ,
205+ "ksmbd:%u" ,
206+ ksmbd_tcp_get_port (csin ));
207+ if (IS_ERR (handler )) {
207208 pr_err ("cannot start conn thread\n" );
208- rc = PTR_ERR (KSMBD_TRANS ( t ) -> handler );
209+ rc = PTR_ERR (handler );
209210 free_transport (t );
210211 }
211212 return rc ;
You can’t perform that action at this time.
0 commit comments