Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cifs: use DFS root session instead of tcon ses

Use DFS root session whenever possible to get new DFS referrals
otherwise we might end up with an IPC tcon (tcon->ses->tcon_ipc) that
doesn't respond to them. It should be safe accessing
@ses->dfs_root_ses directly in cifs_inval_name_dfs_link_error() as it
has same lifetime as of @tcon.

Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Cc: stable@vger.kernel.org # 6.2
Signed-off-by: Steve French <stfrench@microsoft.com>

authored by

Paulo Alcantara and committed by
Steve French
6284e46b f446a630

+1
+1
fs/cifs/misc.c
··· 1262 1262 * removing cached DFS targets that the client would eventually 1263 1263 * need during failover. 1264 1264 */ 1265 + ses = CIFS_DFS_ROOT_SES(ses); 1265 1266 if (ses->server->ops->get_dfs_refer && 1266 1267 !ses->server->ops->get_dfs_refer(xid, ses, ref_path, &refs, 1267 1268 &num_refs, cifs_sb->local_nls,