]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit0252552ff279149d84371abb7f88d10b07a82912
tree34614c8299f9551862719f4a86df155a6f528790
parent7b5e6d378ee1dbada4d0ddb79d3b1ffce2fb55e9
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