Skip to content

Commit ece0767

Browse files
sprasad-microsoftSteve French
authored andcommitted
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: Shyam Prasad N <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent e154cb7 commit ece0767

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

fs/cifs/connect.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4295,16 +4295,6 @@ static int __tree_connect_dfs_target(const unsigned int xid, struct cifs_tcon *t
42954295
struct dfs_cache_tgt_iterator *tit;
42964296
bool target_match;
42974297

4298-
/* only send once per connect */
4299-
spin_lock(&cifs_tcp_ses_lock);
4300-
if (tcon->tidStatus != CifsNew &&
4301-
tcon->tidStatus != CifsNeedTcon) {
4302-
spin_unlock(&cifs_tcp_ses_lock);
4303-
return 0;
4304-
}
4305-
tcon->tidStatus = CifsInTcon;
4306-
spin_unlock(&cifs_tcp_ses_lock);
4307-
43084298
extract_unc_hostname(server->hostname, &tcp_host, &tcp_host_len);
43094299

43104300
tit = dfs_cache_get_tgt_iterator(tl);

0 commit comments

Comments
 (0)