diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-04-26 11:44:17 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-04-26 11:44:17 -0700 |
commit | d4fb4bfb37172dbe107aa6f093508fe80c73a46d (patch) | |
tree | efe23bbf7d389fdd3018e6eac4527a13fe8c9382 /fs/cifs/connect.c | |
parent | e9a61afb69f07b1c5880984d45e5cc232ec1bf6f (diff) | |
parent | 0fe0781f29dd8ab618999e6bda33c782ebbdb109 (diff) | |
download | linux-d4fb4bfb37172dbe107aa6f093508fe80c73a46d.tar.gz linux-d4fb4bfb37172dbe107aa6f093508fe80c73a46d.tar.bz2 linux-d4fb4bfb37172dbe107aa6f093508fe80c73a46d.zip |
Merge tag '5.7-rc2-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6
Pull cifs fixes from Steve French:
"Five cifs/smb3 fixes:two for DFS reconnect failover, one lease fix for
stable and the others to fix a missing spinlock during reconnect"
* tag '5.7-rc2-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
cifs: fix uninitialised lease_key in open_shroot()
cifs: ensure correct super block for DFS reconnect
cifs: do not share tcons with DFS
cifs: minor update to comments around the cifs_tcp_ses_lock mutex
cifs: protect updating server->dstaddr with a spinlock
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 95b3ab0ca8c0..28268ed461b8 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -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; |