]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
cifs: check for smb1 in open_cached_dir()
authorRonnie Sahlberg <lsahlber@redhat.com>
Mon, 9 May 2022 23:42:05 +0000 (09:42 +1000)
committerSteve French <stfrench@microsoft.com>
Sat, 21 May 2022 17:23:08 +0000 (12:23 -0500)
commit198bf836dfb9c76105c93e6a3138ed1a33841fad
treef7bbfb1a29686de7fb9c719d84be0b31435362a2
parentf695b2893505a5ac812f32167b48b028a4e41494
cifs: check for smb1 in open_cached_dir()

Check protocol version in open_cached_dir() and return not supported
for SMB1.  This allows us to call open_cached_dir() from code that
is common to both smb1 and smb2/3 in future patches without having to
do this check in the call-site.
At the same time, add a check if tcon is valid or not for the same reason.

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