Lines Matching full:tcon
73 * release it as any new DFS referrals must go through its IPC tcon.
206 struct cifs_tcon *tcon; in __dfs_mount_share() local
224 else if (WARN_ON(!mnt_ctx->tcon)) in __dfs_mount_share()
230 tcon = mnt_ctx->tcon; in __dfs_mount_share()
231 spin_lock(&tcon->tc_lock); in __dfs_mount_share()
232 tcon->origin_fullpath = origin_fullpath; in __dfs_mount_share()
234 ref_walk_set_tcon(rw, tcon); in __dfs_mount_share()
235 spin_unlock(&tcon->tc_lock); in __dfs_mount_share()
236 queue_delayed_work(dfscache_wq, &tcon->dfs_cache_work, in __dfs_mount_share()
337 struct cifs_tcon *tcon, in tree_connect_dfs_target() argument
342 const struct smb_version_operations *ops = tcon->ses->server->ops; in tree_connect_dfs_target()
343 struct TCP_Server_Info *server = tcon->ses->server; in tree_connect_dfs_target()
373 rc = ops->tree_connect(xid, tcon->ses, tree, in tree_connect_dfs_target()
374 tcon, tcon->ses->local_nls); in tree_connect_dfs_target()
386 int cifs_tree_connect(const unsigned int xid, struct cifs_tcon *tcon) in cifs_tree_connect() argument
389 struct TCP_Server_Info *server = tcon->ses->server; in cifs_tree_connect()
398 spin_lock(&tcon->tc_lock); in cifs_tree_connect()
400 /* if tcon is marked for needing reconnect, update state */ in cifs_tree_connect()
401 if (tcon->need_reconnect) in cifs_tree_connect()
402 tcon->status = TID_NEED_TCON; in cifs_tree_connect()
404 if (tcon->status == TID_GOOD) { in cifs_tree_connect()
405 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()
409 if (tcon->status != TID_NEW && in cifs_tree_connect()
410 tcon->status != TID_NEED_TCON) { in cifs_tree_connect()
411 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()
415 tcon->status = TID_IN_TCON; in cifs_tree_connect()
416 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()
424 if (tcon->ipc) { in cifs_tree_connect()
428 rc = ops->tree_connect(xid, tcon->ses, tree, in cifs_tree_connect()
429 tcon, tcon->ses->local_nls); in cifs_tree_connect()
433 sb = cifs_get_dfs_tcon_super(tcon); in cifs_tree_connect()
437 /* Tree connect to last share in @tcon->tree_name if no DFS referral */ in cifs_tree_connect()
440 rc = ops->tree_connect(xid, tcon->ses, tcon->tree_name, in cifs_tree_connect()
441 tcon, tcon->ses->local_nls); in cifs_tree_connect()
445 rc = tree_connect_dfs_target(xid, tcon, cifs_sb, tree, ref.server_type == DFS_TYPE_LINK, in cifs_tree_connect()
454 spin_lock(&tcon->tc_lock); in cifs_tree_connect()
455 if (tcon->status == TID_IN_TCON) in cifs_tree_connect()
456 tcon->status = TID_NEED_TCON; in cifs_tree_connect()
457 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()
459 spin_lock(&tcon->tc_lock); in cifs_tree_connect()
460 if (tcon->status == TID_IN_TCON) in cifs_tree_connect()
461 tcon->status = TID_GOOD; in cifs_tree_connect()
462 tcon->need_reconnect = false; in cifs_tree_connect()
463 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()