Skip to content

Commit 7d397a0

Browse files
Paulo Alcantarasmfrench
authored andcommitted
cifs: rename reconn_inval_dfs_target()
This function has nothing to do with *invalidation* but setting up the next target server from a cached referral. Rename it to reconn_set_next_dfs_target(). While at it, get rid of some meaningless checks. Signed-off-by: Paulo Alcantara (SUSE) <[email protected]> Reviewed-by: Aurelien Aptel <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 2e5de42 commit 7d397a0

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

fs/cifs/connect.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -393,15 +393,14 @@ static inline int reconn_set_ipaddr(struct TCP_Server_Info *server)
393393

394394
#ifdef CONFIG_CIFS_DFS_UPCALL
395395
/* These functions must be called with server->srv_mutex held */
396-
static void reconn_inval_dfs_target(struct TCP_Server_Info *server,
397-
struct cifs_sb_info *cifs_sb,
398-
struct dfs_cache_tgt_list *tgt_list,
399-
struct dfs_cache_tgt_iterator **tgt_it)
396+
static void reconn_set_next_dfs_target(struct TCP_Server_Info *server,
397+
struct cifs_sb_info *cifs_sb,
398+
struct dfs_cache_tgt_list *tgt_list,
399+
struct dfs_cache_tgt_iterator **tgt_it)
400400
{
401401
const char *name;
402402

403-
if (!cifs_sb || !cifs_sb->origin_fullpath || !tgt_list ||
404-
!server->nr_targets)
403+
if (!cifs_sb || !cifs_sb->origin_fullpath)
405404
return;
406405

407406
if (!*tgt_it) {
@@ -578,7 +577,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
578577
* feature is disabled, then we will retry last server we
579578
* connected to before.
580579
*/
581-
reconn_inval_dfs_target(server, cifs_sb, &tgt_list, &tgt_it);
580+
reconn_set_next_dfs_target(server, cifs_sb, &tgt_list, &tgt_it);
582581
#endif
583582
rc = reconn_set_ipaddr(server);
584583
if (rc) {

0 commit comments

Comments
 (0)