mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 23:25:07 +00:00
cifs: handle reconnect of tcon when there is no cached dfs referral
commit 507345b5ae
upstream.
When there is no cached DFS referral of tcon->dfs_path, then reconnect
to same share.
Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Cc: <stable@vger.kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b93f949942
commit
72797ffca1
1 changed files with 2 additions and 4 deletions
|
@ -5352,7 +5352,8 @@ int cifs_tree_connect(const unsigned int xid, struct cifs_tcon *tcon, const stru
|
|||
if (!tree)
|
||||
return -ENOMEM;
|
||||
|
||||
if (!tcon->dfs_path) {
|
||||
/* If it is not dfs or there was no cached dfs referral, then reconnect to same share */
|
||||
if (!tcon->dfs_path || dfs_cache_noreq_find(tcon->dfs_path + 1, &ref, &tl)) {
|
||||
if (tcon->ipc) {
|
||||
scnprintf(tree, MAX_TREE_SIZE, "\\\\%s\\IPC$", server->hostname);
|
||||
rc = ops->tree_connect(xid, tcon->ses, tree, tcon, nlsc);
|
||||
|
@ -5362,9 +5363,6 @@ int cifs_tree_connect(const unsigned int xid, struct cifs_tcon *tcon, const stru
|
|||
goto out;
|
||||
}
|
||||
|
||||
rc = dfs_cache_noreq_find(tcon->dfs_path + 1, &ref, &tl);
|
||||
if (rc)
|
||||
goto out;
|
||||
isroot = ref.server_type == DFS_TYPE_ROOT;
|
||||
free_dfs_info_param(&ref);
|
||||
|
||||
|
|
Loading…
Reference in a new issue