cifs: ensure correct super block for DFS reconnect
authorPaulo Alcantara <pc@cjr.nz>
Mon, 20 Apr 2020 22:43:04 +0000 (19:43 -0300)
committerSteve French <stfrench@microsoft.com>
Thu, 23 Apr 2020 01:27:30 +0000 (20:27 -0500)
commit3786f4bddc7b8c6e90cbf5f52c2443a8d8e1dede
tree34614c8299f9551862719f4a86df155a6f528790
parent65303de829dd6d291a4947c1a31de31896f8a060
cifs: ensure correct super block for DFS reconnect

This patch is basically fixing the lookup of tcons (DFS specific) during
reconnect (smb2pdu.c:__smb2_reconnect) to update their prefix paths.

Previously, we relied on the TCP_Server_Info pointer
(misc.c:tcp_super_cb) to determine which tcon to update the prefix path

We could not rely on TCP server pointer to determine which super block
to update the prefix path when reconnecting tcons since it might map
to different tcons that share same TCP connection.

Instead, walk through all cifs super blocks and compare their DFS full
paths with the tcon being updated to.

Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
fs/cifs/misc.c