Skip to content

Commit

Permalink
cifs: remove repeated state change in dfs tree connect
Browse files Browse the repository at this point in the history
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: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
  • Loading branch information
Shyam Prasad N authored and Steve French committed Jan 19, 2022
1 parent e154cb7 commit ece0767
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ece0767

Please sign in to comment.