All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paulo Alcantara <pc@cjr.nz>
To: linux-cifs@vger.kernel.org, smfrench@gmail.com
Cc: Paulo Alcantara <pc@cjr.nz>
Subject: [PATCH v2 3/7] cifs: rename reconn_inval_dfs_target()
Date: Mon,  6 Jul 2020 15:16:05 -0300	[thread overview]
Message-ID: <20200706181609.19480-4-pc@cjr.nz> (raw)
In-Reply-To: <20200706181609.19480-1-pc@cjr.nz>

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>
---
 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 632978db2dbd..9582f63b8ebc 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -393,15 +393,14 @@ static inline int reconn_set_ipaddr(struct TCP_Server_Info *server)
 
 #ifdef CONFIG_CIFS_DFS_UPCALL
 /* These functions must be called with server->srv_mutex held */
-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) {
@@ -578,7 +577,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.27.0


  parent reply	other threads:[~2020-07-06 18:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06 18:16 [PATCH v2 0/7] DFS fixes Paulo Alcantara
2020-07-06 18:16 ` [PATCH v2 1/7] cifs: merge __{cifs,smb2}_reconnect[_tcon]() into cifs_tree_connect() Paulo Alcantara
2020-07-09 14:54   ` Aurélien Aptel
2020-07-06 18:16 ` [PATCH v2 2/7] cifs: reduce number of referral requests in DFS link lookups Paulo Alcantara
2020-07-09 14:52   ` Aurélien Aptel
2020-07-06 18:16 ` Paulo Alcantara [this message]
2020-07-09 14:55   ` [PATCH v2 3/7] cifs: rename reconn_inval_dfs_target() Aurélien Aptel
2020-07-06 18:16 ` [PATCH v2 4/7] cifs: handle empty list of targets in cifs_reconnect() Paulo Alcantara
2020-07-09 15:38   ` Aurélien Aptel
2020-07-06 18:16 ` [PATCH v2 5/7] cifs: handle RESP_GET_DFS_REFERRAL.PathConsumed in reconnect Paulo Alcantara
2020-07-06 18:16 ` [PATCH v2 6/7] cifs: only update prefix path of DFS links in cifs_tree_connect() Paulo Alcantara
2020-07-06 18:16 ` [PATCH v2 7/7] cifs: document and cleanup dfs mount Paulo Alcantara
2020-07-09 14:49   ` Aurélien Aptel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200706181609.19480-4-pc@cjr.nz \
    --to=pc@cjr.nz \
    --cc=linux-cifs@vger.kernel.org \
    --cc=smfrench@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.