Skip to content

Commit 22aeb01

Browse files
Paulo AlcantaraSteve French
authored andcommitted
cifs: do not query ifaces on smb1 mounts
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: 6e1c1c0 ("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>
1 parent 39e8db3 commit 22aeb01

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

fs/cifs/connect.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2606,11 +2606,14 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb3_fs_context *ctx)
26062606
INIT_LIST_HEAD(&tcon->pending_opens);
26072607
tcon->status = TID_GOOD;
26082608

2609-
/* schedule query interfaces poll */
26102609
INIT_DELAYED_WORK(&tcon->query_interfaces,
26112610
smb2_query_server_interfaces);
2612-
queue_delayed_work(cifsiod_wq, &tcon->query_interfaces,
2613-
(SMB_INTERFACE_POLL_INTERVAL * HZ));
2611+
if (ses->server->dialect >= SMB30_PROT_ID &&
2612+
(ses->server->capabilities & SMB2_GLOBAL_CAP_MULTI_CHANNEL)) {
2613+
/* schedule query interfaces poll */
2614+
queue_delayed_work(cifsiod_wq, &tcon->query_interfaces,
2615+
(SMB_INTERFACE_POLL_INTERVAL * HZ));
2616+
}
26142617

26152618
spin_lock(&cifs_tcp_ses_lock);
26162619
list_add(&tcon->tcon_list, &ses->tcon_list);

0 commit comments

Comments
 (0)