Merge tag 'usb-serial-5.7-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / fs / cifs / connect.c
index 95b3ab0..28268ed 100644 (file)
@@ -375,8 +375,10 @@ static int reconn_set_ipaddr(struct TCP_Server_Info *server)
                return rc;
        }
 
+       spin_lock(&cifs_tcp_ses_lock);
        rc = cifs_convert_address((struct sockaddr *)&server->dstaddr, ipaddr,
                                  strlen(ipaddr));
+       spin_unlock(&cifs_tcp_ses_lock);
        kfree(ipaddr);
 
        return !rc ? -1 : 0;
@@ -3373,6 +3375,10 @@ cifs_find_tcon(struct cifs_ses *ses, struct smb_vol *volume_info)
        spin_lock(&cifs_tcp_ses_lock);
        list_for_each(tmp, &ses->tcon_list) {
                tcon = list_entry(tmp, struct cifs_tcon, tcon_list);
+#ifdef CONFIG_CIFS_DFS_UPCALL
+               if (tcon->dfs_path)
+                       continue;
+#endif
                if (!match_tcon(tcon, volume_info))
                        continue;
                ++tcon->tc_count;