Lines Matching refs:server

323 static int update_server_fullpath(struct TCP_Server_Info *server, struct cifs_sb_info *cifs_sb,  in update_server_fullpath()  argument
355 mutex_lock(&server->refpath_lock); in update_server_fullpath()
356 spin_lock(&server->srv_lock); in update_server_fullpath()
357 kfree(server->leaf_fullpath); in update_server_fullpath()
358 server->leaf_fullpath = npath; in update_server_fullpath()
359 spin_unlock(&server->srv_lock); in update_server_fullpath()
360 mutex_unlock(&server->refpath_lock); in update_server_fullpath()
365 static int target_share_matches_server(struct TCP_Server_Info *server, char *share, in target_share_matches_server() argument
376 cifs_server_lock(server); in target_share_matches_server()
377 if (dfs_host_len != strlen(server->hostname) || in target_share_matches_server()
378 strncasecmp(dfs_host, server->hostname, dfs_host_len)) { in target_share_matches_server()
380 (int)dfs_host_len, dfs_host, server->hostname); in target_share_matches_server()
381 rc = match_target_ip(server, dfs_host, dfs_host_len, target_match); in target_share_matches_server()
385 cifs_server_unlock(server); in target_share_matches_server()
393 struct TCP_Server_Info *server = ses->server; in __tree_connect_ipc() local
399 if (cifs_chan_needs_reconnect(ses, server) || in __tree_connect_ipc()
410 cifs_server_lock(server); in __tree_connect_ipc()
411 scnprintf(tree, MAX_TREE_SIZE, "\\\\%s\\IPC$", server->hostname); in __tree_connect_ipc()
412 cifs_server_unlock(server); in __tree_connect_ipc()
414 rc = server->ops->tree_connect(xid, ses, tree, tcon, in __tree_connect_ipc()
442 struct TCP_Server_Info *server = tcon->ses->server; in __tree_connect_dfs_target() local
443 const struct smb_version_operations *ops = server->ops; in __tree_connect_dfs_target()
465 rc = dfs_cache_get_tgt_share(server->leaf_fullpath + 1, tit, &share, &prefix); in __tree_connect_dfs_target()
471 rc = target_share_matches_server(server, share, &target_match); in __tree_connect_dfs_target()
479 dfs_cache_noreq_update_tgthint(server->leaf_fullpath + 1, tit); in __tree_connect_dfs_target()
503 rc = update_server_fullpath(server, cifs_sb, target); in __tree_connect_dfs_target()
528 struct TCP_Server_Info *server = tcon->ses->server; in tree_connect_dfs_target() local
529 char *old_fullpath = server->leaf_fullpath; in tree_connect_dfs_target()
540 if (rc && server->leaf_fullpath != old_fullpath) in tree_connect_dfs_target()
541 cifs_signal_cifsd_for_reconnect(server, true); in tree_connect_dfs_target()
550 struct TCP_Server_Info *server = tcon->ses->server; in cifs_tree_connect() local
551 const struct smb_version_operations *ops = server->ops; in cifs_tree_connect()
581 cifs_server_lock(server); in cifs_tree_connect()
582 scnprintf(tree, MAX_TREE_SIZE, "\\\\%s\\IPC$", server->hostname); in cifs_tree_connect()
583 cifs_server_unlock(server); in cifs_tree_connect()
596 if (!cifs_sb || !server->leaf_fullpath || in cifs_tree_connect()
597 dfs_cache_noreq_find(server->leaf_fullpath + 1, &ref, &tl)) { in cifs_tree_connect()