Lines Matching refs:server
167 struct TCP_Server_Info *server; in __dfs_mount_share() local
236 server = mnt_ctx->server; in __dfs_mount_share()
238 mutex_lock(&server->refpath_lock); in __dfs_mount_share()
239 server->origin_fullpath = origin_fullpath; in __dfs_mount_share()
240 server->current_fullpath = server->leaf_fullpath; in __dfs_mount_share()
241 mutex_unlock(&server->refpath_lock); in __dfs_mount_share()
289 static int update_server_fullpath(struct TCP_Server_Info *server, struct cifs_sb_info *cifs_sb, in update_server_fullpath() argument
321 mutex_lock(&server->refpath_lock); in update_server_fullpath()
322 kfree(server->leaf_fullpath); in update_server_fullpath()
323 server->leaf_fullpath = npath; in update_server_fullpath()
324 mutex_unlock(&server->refpath_lock); in update_server_fullpath()
325 server->current_fullpath = server->leaf_fullpath; in update_server_fullpath()
330 static int target_share_matches_server(struct TCP_Server_Info *server, char *share, in target_share_matches_server() argument
341 cifs_server_lock(server); in target_share_matches_server()
342 if (dfs_host_len != strlen(server->hostname) || in target_share_matches_server()
343 strncasecmp(dfs_host, server->hostname, dfs_host_len)) { in target_share_matches_server()
345 (int)dfs_host_len, dfs_host, server->hostname); in target_share_matches_server()
346 rc = match_target_ip(server, dfs_host, dfs_host_len, target_match); in target_share_matches_server()
350 cifs_server_unlock(server); in target_share_matches_server()
359 struct TCP_Server_Info *server = tcon->ses->server; in __tree_connect_dfs_target() local
360 const struct smb_version_operations *ops = server->ops; in __tree_connect_dfs_target()
383 rc = dfs_cache_get_tgt_share(server->current_fullpath + 1, tit, &share, &prefix); in __tree_connect_dfs_target()
389 rc = target_share_matches_server(server, share, &target_match); in __tree_connect_dfs_target()
397 dfs_cache_noreq_update_tgthint(server->current_fullpath + 1, tit); in __tree_connect_dfs_target()
400 scnprintf(tree, MAX_TREE_SIZE, "\\\\%s\\IPC$", server->hostname); in __tree_connect_dfs_target()
425 rc = update_server_fullpath(server, cifs_sb, target); in __tree_connect_dfs_target()
450 struct TCP_Server_Info *server = tcon->ses->server; in tree_connect_dfs_target() local
451 char *old_fullpath = server->leaf_fullpath; in tree_connect_dfs_target()
462 if (rc && server->leaf_fullpath != old_fullpath) in tree_connect_dfs_target()
463 cifs_signal_cifsd_for_reconnect(server, true); in tree_connect_dfs_target()
472 struct TCP_Server_Info *server = tcon->ses->server; in cifs_tree_connect() local
473 const struct smb_version_operations *ops = server->ops; in cifs_tree_connect()
498 cifs_server_lock(server); in cifs_tree_connect()
499 scnprintf(tree, MAX_TREE_SIZE, "\\\\%s\\IPC$", server->hostname); in cifs_tree_connect()
500 cifs_server_unlock(server); in cifs_tree_connect()
505 sb = cifs_get_tcp_super(server); in cifs_tree_connect()
515 if (!server->current_fullpath || in cifs_tree_connect()
516 dfs_cache_noreq_find(server->current_fullpath + 1, &ref, &tl)) { in cifs_tree_connect()