Lines Matching full:tcon
70 * release it as any new DFS referrals must go through its IPC tcon.
216 struct cifs_tcon *tcon; in __dfs_mount_share() local
234 else if (WARN_ON(!mnt_ctx->tcon)) in __dfs_mount_share()
240 tcon = mnt_ctx->tcon; in __dfs_mount_share()
241 spin_lock(&tcon->tc_lock); in __dfs_mount_share()
242 tcon->origin_fullpath = origin_fullpath; in __dfs_mount_share()
244 ref_walk_set_tcon(rw, tcon); in __dfs_mount_share()
245 spin_unlock(&tcon->tc_lock); in __dfs_mount_share()
246 queue_delayed_work(dfscache_wq, &tcon->dfs_cache_work, in __dfs_mount_share()
349 struct cifs_tcon *tcon, in tree_connect_dfs_target() argument
354 const struct smb_version_operations *ops = tcon->ses->server->ops; in tree_connect_dfs_target()
355 struct TCP_Server_Info *server = tcon->ses->server; in tree_connect_dfs_target()
385 rc = ops->tree_connect(xid, tcon->ses, tree, in tree_connect_dfs_target()
386 tcon, tcon->ses->local_nls); in tree_connect_dfs_target()
398 int cifs_tree_connect(const unsigned int xid, struct cifs_tcon *tcon, const struct nls_table *nlsc) in cifs_tree_connect() argument
401 struct TCP_Server_Info *server = tcon->ses->server; in cifs_tree_connect()
410 spin_lock(&tcon->tc_lock); in cifs_tree_connect()
412 /* if tcon is marked for needing reconnect, update state */ in cifs_tree_connect()
413 if (tcon->need_reconnect) in cifs_tree_connect()
414 tcon->status = TID_NEED_TCON; in cifs_tree_connect()
416 if (tcon->status == TID_GOOD) { in cifs_tree_connect()
417 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()
421 if (tcon->status != TID_NEW && in cifs_tree_connect()
422 tcon->status != TID_NEED_TCON) { in cifs_tree_connect()
423 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()
427 tcon->status = TID_IN_TCON; in cifs_tree_connect()
428 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()
436 if (tcon->ipc) { in cifs_tree_connect()
440 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, nlsc); in cifs_tree_connect()
444 sb = cifs_get_dfs_tcon_super(tcon); in cifs_tree_connect()
448 /* Tree connect to last share in @tcon->tree_name if no DFS referral */ in cifs_tree_connect()
451 rc = ops->tree_connect(xid, tcon->ses, tcon->tree_name, in cifs_tree_connect()
452 tcon, tcon->ses->local_nls); in cifs_tree_connect()
456 rc = tree_connect_dfs_target(xid, tcon, cifs_sb, tree, ref.server_type == DFS_TYPE_LINK, in cifs_tree_connect()
465 spin_lock(&tcon->tc_lock); in cifs_tree_connect()
466 if (tcon->status == TID_IN_TCON) in cifs_tree_connect()
467 tcon->status = TID_NEED_TCON; in cifs_tree_connect()
468 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()
470 spin_lock(&tcon->tc_lock); in cifs_tree_connect()
471 if (tcon->status == TID_IN_TCON) in cifs_tree_connect()
472 tcon->status = TID_GOOD; in cifs_tree_connect()
473 tcon->need_reconnect = false; in cifs_tree_connect()
474 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()