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()
396 struct cifs_tcon *tcon = ses->tcon_ipc; in __tree_connect_ipc() local
416 rc = server->ops->tree_connect(xid, ses, tree, tcon, in __tree_connect_ipc()
419 spin_lock(&tcon->tc_lock); in __tree_connect_ipc()
421 tcon->status = TID_NEED_TCON; in __tree_connect_ipc()
423 tcon->status = TID_GOOD; in __tree_connect_ipc()
424 tcon->need_reconnect = false; in __tree_connect_ipc()
426 spin_unlock(&tcon->tc_lock); in __tree_connect_ipc()
431 struct cifs_tcon *tcon) in tree_connect_ipc() argument
433 struct cifs_ses *ses = tcon->ses; in tree_connect_ipc()
439 static int __tree_connect_dfs_target(const unsigned int xid, struct cifs_tcon *tcon, in __tree_connect_dfs_target() argument
444 struct TCP_Server_Info *server = tcon->ses->server; in __tree_connect_dfs_target()
446 struct cifs_ses *root_ses = CIFS_DFS_ROOT_SES(tcon->ses); in __tree_connect_dfs_target()
482 tree_connect_ipc(xid, tree, cifs_sb, tcon); in __tree_connect_dfs_target()
486 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, cifs_sb->local_nls); in __tree_connect_dfs_target()
498 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, cifs_sb->local_nls); in __tree_connect_dfs_target()
524 static int tree_connect_dfs_target(const unsigned int xid, struct cifs_tcon *tcon, in tree_connect_dfs_target() argument
530 struct TCP_Server_Info *server = tcon->ses->server; in tree_connect_dfs_target()
534 rc = __tree_connect_dfs_target(xid, tcon, cifs_sb, tree, islink, tl); in tree_connect_dfs_target()
549 int cifs_tree_connect(const unsigned int xid, struct cifs_tcon *tcon, const struct nls_table *nlsc) in cifs_tree_connect() argument
552 struct TCP_Server_Info *server = tcon->ses->server; in cifs_tree_connect()
561 spin_lock(&tcon->tc_lock); in cifs_tree_connect()
563 /* if tcon is marked for needing reconnect, update state */ in cifs_tree_connect()
564 if (tcon->need_reconnect) in cifs_tree_connect()
565 tcon->status = TID_NEED_TCON; in cifs_tree_connect()
567 if (tcon->status == TID_GOOD) { in cifs_tree_connect()
568 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()
572 if (tcon->status != TID_NEW && in cifs_tree_connect()
573 tcon->status != TID_NEED_TCON) { in cifs_tree_connect()
574 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()
578 tcon->status = TID_IN_TCON; in cifs_tree_connect()
579 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()
587 if (tcon->ipc) { in cifs_tree_connect()
591 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, nlsc); in cifs_tree_connect()
595 sb = cifs_get_dfs_tcon_super(tcon); in cifs_tree_connect()
600 * Tree connect to last share in @tcon->tree_name whether dfs super or in cifs_tree_connect()
605 rc = ops->tree_connect(xid, tcon->ses, tcon->tree_name, tcon, in cifs_tree_connect()
610 rc = tree_connect_dfs_target(xid, tcon, cifs_sb, tree, ref.server_type == DFS_TYPE_LINK, in cifs_tree_connect()
619 spin_lock(&tcon->tc_lock); in cifs_tree_connect()
620 if (tcon->status == TID_IN_TCON) in cifs_tree_connect()
621 tcon->status = TID_NEED_TCON; in cifs_tree_connect()
622 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()
624 spin_lock(&tcon->tc_lock); in cifs_tree_connect()
625 if (tcon->status == TID_IN_TCON) in cifs_tree_connect()
626 tcon->status = TID_GOOD; in cifs_tree_connect()
627 tcon->need_reconnect = false; in cifs_tree_connect()
628 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()