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

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) <pc@cjr.nz>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>

authored by

Paulo Alcantara and committed by
Steve French
7d397a03 2e5de424

+6 -7
+6 -7
fs/cifs/connect.c
··· 393 393 394 394 #ifdef CONFIG_CIFS_DFS_UPCALL 395 395 /* 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) 400 400 { 401 401 const char *name; 402 402 403 - if (!cifs_sb || !cifs_sb->origin_fullpath || !tgt_list || 404 - !server->nr_targets) 403 + if (!cifs_sb || !cifs_sb->origin_fullpath) 405 404 return; 406 405 407 406 if (!*tgt_it) { ··· 577 578 * feature is disabled, then we will retry last server we 578 579 * connected to before. 579 580 */ 580 - reconn_inval_dfs_target(server, cifs_sb, &tgt_list, &tgt_it); 581 + reconn_set_next_dfs_target(server, cifs_sb, &tgt_list, &tgt_it); 581 582 #endif 582 583 rc = reconn_set_ipaddr(server); 583 584 if (rc) {