@@ -356,10 +356,9 @@ cifs_disable_secondary_channels(struct cifs_ses *ses)
356356
357357/*
358358 * update the iface for the channel if necessary.
359- * will return 0 when iface is updated, 1 if removed, 2 otherwise
360359 * Must be called with chan_lock held.
361360 */
362- int
361+ void
363362cifs_chan_update_iface (struct cifs_ses * ses , struct TCP_Server_Info * server )
364363{
365364 unsigned int chan_index ;
@@ -368,20 +367,19 @@ cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server)
368367 struct cifs_server_iface * old_iface = NULL ;
369368 struct cifs_server_iface * last_iface = NULL ;
370369 struct sockaddr_storage ss ;
371- int rc = 0 ;
372370
373371 spin_lock (& ses -> chan_lock );
374372 chan_index = cifs_ses_get_chan_index (ses , server );
375373 if (chan_index == CIFS_INVAL_CHAN_INDEX ) {
376374 spin_unlock (& ses -> chan_lock );
377- return 0 ;
375+ return ;
378376 }
379377
380378 if (ses -> chans [chan_index ].iface ) {
381379 old_iface = ses -> chans [chan_index ].iface ;
382380 if (old_iface -> is_active ) {
383381 spin_unlock (& ses -> chan_lock );
384- return 1 ;
382+ return ;
385383 }
386384 }
387385 spin_unlock (& ses -> chan_lock );
@@ -394,7 +392,7 @@ cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server)
394392 if (!ses -> iface_count ) {
395393 spin_unlock (& ses -> iface_lock );
396394 cifs_dbg (VFS , "server %s does not advertise interfaces\n" , ses -> server -> hostname );
397- return 0 ;
395+ return ;
398396 }
399397
400398 last_iface = list_last_entry (& ses -> iface_list , struct cifs_server_iface ,
@@ -434,7 +432,6 @@ cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server)
434432 }
435433
436434 if (list_entry_is_head (iface , & ses -> iface_list , iface_head )) {
437- rc = 1 ;
438435 iface = NULL ;
439436 cifs_dbg (FYI , "unable to find a suitable iface\n" );
440437 }
@@ -449,7 +446,7 @@ cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server)
449446 }
450447
451448 spin_unlock (& ses -> iface_lock );
452- return 0 ;
449+ return ;
453450 }
454451
455452 /* now drop the ref to the current iface */
@@ -478,13 +475,13 @@ cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server)
478475 chan_index = cifs_ses_get_chan_index (ses , server );
479476 if (chan_index == CIFS_INVAL_CHAN_INDEX ) {
480477 spin_unlock (& ses -> chan_lock );
481- return 0 ;
478+ return ;
482479 }
483480
484481 ses -> chans [chan_index ].iface = iface ;
485482 spin_unlock (& ses -> chan_lock );
486483
487- return rc ;
484+ return ;
488485}
489486
490487/*
0 commit comments