Commit ece07676 authored by Shyam Prasad N's avatar Shyam Prasad N Committed by Steve French
Browse files

cifs: remove repeated state change in dfs tree connect



cifs_tree_connect checks and sets the tidStatus for the tcon.
cifs_tree_connect also calls a dfs specific tree connect
function, which also does similar checks. This should
not happen. Removing it with this change.

Signed-off-by: default avatarShyam Prasad N <sprasad@microsoft.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent e154cb7b
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -4295,16 +4295,6 @@ static int __tree_connect_dfs_target(const unsigned int xid, struct cifs_tcon *t
	struct dfs_cache_tgt_iterator *tit;
	bool target_match;

	/* only send once per connect */
	spin_lock(&cifs_tcp_ses_lock);
	if (tcon->tidStatus != CifsNew &&
	    tcon->tidStatus != CifsNeedTcon) {
		spin_unlock(&cifs_tcp_ses_lock);
		return 0;
	}
	tcon->tidStatus = CifsInTcon;
	spin_unlock(&cifs_tcp_ses_lock);

	extract_unc_hostname(server->hostname, &tcp_host, &tcp_host_len);

	tit = dfs_cache_get_tgt_iterator(tl);