cifs: fix reconnect on smb3 mount types
authorPaulo Alcantara <pc@cjr.nz>
Sun, 5 Jun 2022 22:54:26 +0000 (19:54 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:36:25 +0000 (18:36 +0200)
commit0cd4a17667591089dc2621e3b959567a24ed396f
treed2c2caa7830d73ecf89ca832cc2926f65f5b2525
parent7aa4b31291f1d750f40b75b235c13ad89aaecf39
cifs: fix reconnect on smb3 mount types

commit c36ee7dab7749f7be21f7a72392744490b2a9a2b upstream.

cifs.ko defines two file system types: cifs & smb3, and
__cifs_get_super() was not including smb3 file system type when
looking up superblocks, therefore failing to reconnect tcons in
cifs_tree_connect().

Fix this by calling iterate_supers_type() on both file system types.

Link: https://lore.kernel.org/r/CAFrh3J9soC36+BVuwHB=g9z_KB5Og2+p2_W+BBoBOZveErz14w@mail.gmail.com
Cc: stable@vger.kernel.org
Tested-by: Satadru Pramanik <satadru@gmail.com>
Reported-by: Satadru Pramanik <satadru@gmail.com>
Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/cifsfs.c
fs/cifs/cifsfs.h
fs/cifs/misc.c