Lines Matching refs:tcon

233 	struct cifs_tcon *tcon;  in __dfs_mount_share()  local
245 tcon = mnt_ctx->tcon; in __dfs_mount_share()
246 spin_lock(&tcon->tc_lock); in __dfs_mount_share()
247 if (!tcon->origin_fullpath) { in __dfs_mount_share()
248 tcon->origin_fullpath = origin_fullpath; in __dfs_mount_share()
251 spin_unlock(&tcon->tc_lock); in __dfs_mount_share()
253 if (list_empty(&tcon->dfs_ses_list)) { in __dfs_mount_share()
254 list_replace_init(&mnt_ctx->dfs_ses_list, &tcon->dfs_ses_list); in __dfs_mount_share()
255 queue_delayed_work(dfscache_wq, &tcon->dfs_cache_work, in __dfs_mount_share()
394 struct cifs_tcon *tcon = ses->tcon_ipc; in __tree_connect_ipc() local
414 rc = server->ops->tree_connect(xid, ses, tree, tcon, in __tree_connect_ipc()
417 spin_lock(&tcon->tc_lock); in __tree_connect_ipc()
419 tcon->status = TID_NEED_TCON; in __tree_connect_ipc()
421 tcon->status = TID_GOOD; in __tree_connect_ipc()
422 tcon->need_reconnect = false; in __tree_connect_ipc()
424 spin_unlock(&tcon->tc_lock); in __tree_connect_ipc()
429 struct cifs_tcon *tcon) in tree_connect_ipc() argument
431 struct cifs_ses *ses = tcon->ses; in tree_connect_ipc()
437 static int __tree_connect_dfs_target(const unsigned int xid, struct cifs_tcon *tcon, in __tree_connect_dfs_target() argument
442 struct TCP_Server_Info *server = tcon->ses->server; in __tree_connect_dfs_target()
444 struct cifs_ses *root_ses = CIFS_DFS_ROOT_SES(tcon->ses); in __tree_connect_dfs_target()
480 tree_connect_ipc(xid, tree, cifs_sb, tcon); in __tree_connect_dfs_target()
484 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, cifs_sb->local_nls); in __tree_connect_dfs_target()
496 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, cifs_sb->local_nls); in __tree_connect_dfs_target()
522 static int tree_connect_dfs_target(const unsigned int xid, struct cifs_tcon *tcon, in tree_connect_dfs_target() argument
528 struct TCP_Server_Info *server = tcon->ses->server; in tree_connect_dfs_target()
532 rc = __tree_connect_dfs_target(xid, tcon, cifs_sb, tree, islink, tl); in tree_connect_dfs_target()
547 int cifs_tree_connect(const unsigned int xid, struct cifs_tcon *tcon, const struct nls_table *nlsc) in cifs_tree_connect() argument
550 struct TCP_Server_Info *server = tcon->ses->server; in cifs_tree_connect()
559 spin_lock(&tcon->tc_lock); in cifs_tree_connect()
560 if (tcon->status == TID_GOOD) { in cifs_tree_connect()
561 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()
565 if (tcon->status != TID_NEW && in cifs_tree_connect()
566 tcon->status != TID_NEED_TCON) { in cifs_tree_connect()
567 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()
571 tcon->status = TID_IN_TCON; in cifs_tree_connect()
572 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()
580 if (tcon->ipc) { in cifs_tree_connect()
584 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, nlsc); in cifs_tree_connect()
588 sb = cifs_get_dfs_tcon_super(tcon); in cifs_tree_connect()
598 rc = ops->tree_connect(xid, tcon->ses, tcon->tree_name, tcon, in cifs_tree_connect()
603 rc = tree_connect_dfs_target(xid, tcon, cifs_sb, tree, ref.server_type == DFS_TYPE_LINK, in cifs_tree_connect()
612 spin_lock(&tcon->tc_lock); in cifs_tree_connect()
613 if (tcon->status == TID_IN_TCON) in cifs_tree_connect()
614 tcon->status = TID_NEED_TCON; in cifs_tree_connect()
615 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()
617 spin_lock(&tcon->tc_lock); in cifs_tree_connect()
618 if (tcon->status == TID_IN_TCON) in cifs_tree_connect()
619 tcon->status = TID_GOOD; in cifs_tree_connect()
620 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()
621 tcon->need_reconnect = false; in cifs_tree_connect()