[PATCH 1/4] cifs: rename reconn_inval_dfs_target()
Tim Gardner
tim.gardner at canonical.com
Thu May 27 14:49:12 UTC 2021
From: Paulo Alcantara <pc at cjr.nz>
BugLink: https://bugs.launchpad.net/bugs/1929831
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 at cjr.nz>
Reviewed-by: Aurelien Aptel <aaptel at suse.com>
Signed-off-by: Steve French <stfrench at microsoft.com>
(backported from commit 7d397a034d5c45528c7bdf7fc3752c4793029cce)
[rtg minor context adjustmnent]
Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
---
fs/cifs/connect.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index ab9eeb5ff8e57..1746aadf85ef4 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -435,15 +435,14 @@ static inline void put_tcp_super(struct super_block *sb)
cifs_sb_deactive(sb);
}
-static void reconn_inval_dfs_target(struct TCP_Server_Info *server,
- struct cifs_sb_info *cifs_sb,
- struct dfs_cache_tgt_list *tgt_list,
- struct dfs_cache_tgt_iterator **tgt_it)
+static void reconn_set_next_dfs_target(struct TCP_Server_Info *server,
+ struct cifs_sb_info *cifs_sb,
+ struct dfs_cache_tgt_list *tgt_list,
+ struct dfs_cache_tgt_iterator **tgt_it)
{
const char *name;
- if (!cifs_sb || !cifs_sb->origin_fullpath || !tgt_list ||
- !server->nr_targets)
+ if (!cifs_sb || !cifs_sb->origin_fullpath)
return;
if (!*tgt_it) {
@@ -620,7 +619,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
* feature is disabled, then we will retry last server we
* connected to before.
*/
- reconn_inval_dfs_target(server, cifs_sb, &tgt_list, &tgt_it);
+ reconn_set_next_dfs_target(server, cifs_sb, &tgt_list, &tgt_it);
#endif
rc = reconn_set_ipaddr(server);
if (rc) {
--
2.17.1
More information about the kernel-team
mailing list