]> www.infradead.org Git - users/hch/misc.git/commit
smb: client: don't try following DFS links in cifs_tree_connect()
authorPaulo Alcantara <pc@manguebit.com>
Tue, 26 Nov 2024 18:55:53 +0000 (15:55 -0300)
committerSteve French <stfrench@microsoft.com>
Wed, 27 Nov 2024 00:46:35 +0000 (18:46 -0600)
commit36008fe6e3dc588e5e9ceae6e82c7f69399eb5d8
tree97dacf6b0728934372f2f551bbf2c27024557b7f
parente1481075981d25634961c973ed991ba6ab393e67
smb: client: don't try following DFS links in cifs_tree_connect()

We can't properly support chasing DFS links in cifs_tree_connect()
because

  (1) We don't support creating new sessions while we're reconnecting,
      which would be required for DFS interlinks.

  (2) ->is_path_accessible() can't be called from cifs_tree_connect()
     as it would deadlock with smb2_reconnect().  This is required for
     checking if new DFS target is a nested DFS link.

By unconditionally trying to get an DFS referral from new DFS target
isn't correct because if the new DFS target (interlink) is an DFS
standalone namespace, then we would end up getting -ELOOP and then
potentially leaving tcon disconnected.

Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/dfs.c