summaryrefslogtreecommitdiff
path: root/fs/smb/client/connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/smb/client/connect.c')
-rw-r--r--fs/smb/client/connect.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c
index ed6812b888a5..e4027b97e168 100644
--- a/fs/smb/client/connect.c
+++ b/fs/smb/client/connect.c
@@ -50,6 +50,7 @@
#endif
#include "fs_context.h"
#include "cifs_swn.h"
+#include "smb2proto.h"
/* FIXME: should these be tunable? */
#define TLINK_ERROR_EXPIRE (1 * HZ)
@@ -114,33 +115,25 @@ static int reconn_set_ipaddr_from_hostname(struct TCP_Server_Info *server)
static void smb2_query_server_interfaces(struct work_struct *work)
{
- int rc;
+ struct cifs_tcon *tcon = container_of(work, struct cifs_tcon, query_interfaces.work);
int xid;
- struct cifs_tcon *tcon = container_of(work,
- struct cifs_tcon,
- query_interfaces.work);
- struct TCP_Server_Info *server = tcon->ses->server;
+ int rc;
/*
* query server network interfaces, in case they change
*/
- if (!server->ops->query_server_interfaces)
- return;
-
xid = get_xid();
- rc = server->ops->query_server_interfaces(xid, tcon, false);
+ rc = SMB3_request_interfaces(xid, tcon, false);
free_xid(xid);
if (rc) {
if (rc == -EOPNOTSUPP)
return;
- cifs_dbg(FYI, "%s: failed to query server interfaces: %d\n",
- __func__, rc);
+ cifs_dbg(FYI, "%s: failed to query server interfaces: %d\n", __func__, rc);
}
- queue_delayed_work(cifsiod_wq, &tcon->query_interfaces,
- (SMB_INTERFACE_POLL_INTERVAL * HZ));
+ queue_delayed_work(cifsiod_wq, &tcon->query_interfaces, (SMB_INTERFACE_POLL_INTERVAL * HZ));
}
/*
@@ -2694,10 +2687,9 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb3_fs_context *ctx)
INIT_LIST_HEAD(&tcon->pending_opens);
tcon->status = TID_GOOD;
- INIT_DELAYED_WORK(&tcon->query_interfaces,
- smb2_query_server_interfaces);
if (ses->server->dialect >= SMB30_PROT_ID &&
(ses->server->capabilities & SMB2_GLOBAL_CAP_MULTI_CHANNEL)) {
+ INIT_DELAYED_WORK(&tcon->query_interfaces, smb2_query_server_interfaces);
/* schedule query interfaces poll */
queue_delayed_work(cifsiod_wq, &tcon->query_interfaces,
(SMB_INTERFACE_POLL_INTERVAL * HZ));