• Paulo Alcantara's avatar
    cifs: only update prefix path of DFS links in cifs_tree_connect() · 11375a59
    Paulo Alcantara authored
    For DFS root mounts that contain a prefix path, do not change them
    after failover.
    
    E.g., if the user mounts
    
    	//srvA/root/dir1
    
    and then lost connection to srvA, it will reconnect to
    
    	//srvB/root/dir1
    
    In case of DFS links, which may resolve to different prefix paths
    depending on their list of targets, the following must be supported:
    
    	- mount //srvA/root/link/bar
    	- connect to //srvA/share
    	- set prefix path to "bar"
    	- lost connection to srvA
    	- reconnect to next target: //srvB/share/foo
    	- set new prefix path to "foo/bar"
    
    In cifs_tree_connect(), check the server_type field of the cached DFS
    referral to determine whether or not prefix path should be updated.
    Signed-off-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
    Reviewed-by: default avatarAurelien Aptel <aaptel@suse.com>
    Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
    11375a59
connect.c 147 KB