cifs: do not query ifaces on smb1 mounts
authorPaulo Alcantara <pc@cjr.nz>
Tue, 10 Jan 2023 22:23:21 +0000 (19:23 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:58:14 +0000 (11:58 +0100)
commit888c060bc327e6a231304aefc0f30e97b1640338
treefdb4ab20ddb74de121205b3bd97036d5ed634d31
parentd54a3ef8b8bdb9e12dc5ff97d44b9827416eed54
cifs: do not query ifaces on smb1 mounts

commit 22aeb01db7080e18c6aeb4361cc2556c9887099a upstream.

Users have reported the following error on every 600 seconds
(SMB_INTERFACE_POLL_INTERVAL) when mounting SMB1 shares:

CIFS: VFS: \\srv\share error -5 on ioctl to get interface list

It's supported only by SMB2+, so do not query network interfaces on
SMB1 mounts.

Fixes: 6e1c1c08cdf3 ("cifs: periodically query network interfaces from server")
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Reviewed-by: Tom Talpey <tom@talpey.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/connect.c