Lines Matching refs:tcon

71  * On success, their lifetime will be shared by final tcon (dfs_ses_list).
233 struct cifs_tcon *tcon;
245 tcon = mnt_ctx->tcon;
246 spin_lock(&tcon->tc_lock);
247 if (!tcon->origin_fullpath) {
248 tcon->origin_fullpath = origin_fullpath;
251 spin_unlock(&tcon->tc_lock);
253 if (list_empty(&tcon->dfs_ses_list)) {
254 list_replace_init(&mnt_ctx->dfs_ses_list, &tcon->dfs_ses_list);
255 queue_delayed_work(dfscache_wq, &tcon->dfs_cache_work,
402 struct cifs_tcon *tcon = ses->tcon_ipc;
422 rc = server->ops->tree_connect(xid, ses, tree, tcon,
425 spin_lock(&tcon->tc_lock);
427 tcon->status = TID_NEED_TCON;
429 tcon->status = TID_GOOD;
430 tcon->need_reconnect = false;
432 spin_unlock(&tcon->tc_lock);
437 struct cifs_tcon *tcon)
439 struct cifs_ses *ses = tcon->ses;
445 static int __tree_connect_dfs_target(const unsigned int xid, struct cifs_tcon *tcon,
450 struct TCP_Server_Info *server = tcon->ses->server;
452 struct cifs_ses *root_ses = CIFS_DFS_ROOT_SES(tcon->ses);
488 tree_connect_ipc(xid, tree, cifs_sb, tcon);
492 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, cifs_sb->local_nls);
504 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, cifs_sb->local_nls);
530 static int tree_connect_dfs_target(const unsigned int xid, struct cifs_tcon *tcon,
536 struct TCP_Server_Info *server = tcon->ses->server;
540 rc = __tree_connect_dfs_target(xid, tcon, cifs_sb, tree, islink, tl);
555 int cifs_tree_connect(const unsigned int xid, struct cifs_tcon *tcon, const struct nls_table *nlsc)
558 struct TCP_Server_Info *server = tcon->ses->server;
567 spin_lock(&tcon->tc_lock);
569 /* if tcon is marked for needing reconnect, update state */
570 if (tcon->need_reconnect)
571 tcon->status = TID_NEED_TCON;
573 if (tcon->status == TID_GOOD) {
574 spin_unlock(&tcon->tc_lock);
578 if (tcon->status != TID_NEW &&
579 tcon->status != TID_NEED_TCON) {
580 spin_unlock(&tcon->tc_lock);
584 tcon->status = TID_IN_TCON;
585 spin_unlock(&tcon->tc_lock);
593 if (tcon->ipc) {
597 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, nlsc);
601 sb = cifs_get_dfs_tcon_super(tcon);
606 * Tree connect to last share in @tcon->tree_name whether dfs super or
611 rc = ops->tree_connect(xid, tcon->ses, tcon->tree_name, tcon,
616 rc = tree_connect_dfs_target(xid, tcon, cifs_sb, tree, ref.server_type == DFS_TYPE_LINK,
625 spin_lock(&tcon->tc_lock);
626 if (tcon->status == TID_IN_TCON)
627 tcon->status = TID_NEED_TCON;
628 spin_unlock(&tcon->tc_lock);
630 spin_lock(&tcon->tc_lock);
631 if (tcon->status == TID_IN_TCON)
632 tcon->status = TID_GOOD;
633 tcon->need_reconnect = false;
634 spin_unlock(&tcon->tc_lock);