cifs: use DFS root session instead of tcon ses
authorPaulo Alcantara <pc@manguebit.com>
Tue, 14 Mar 2023 23:32:56 +0000 (20:32 -0300)
committerSteve French <stfrench@microsoft.com>
Wed, 15 Mar 2023 03:48:53 +0000 (22:48 -0500)
commit6284e46bdd47743a064fe6ac834a7ac05b1fd206
treed4af34cf76074244b91c12ed49b8911be48a378d
parentf446a630802f154ef0087771683bd4f8e9d08384
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>
fs/cifs/misc.c