• Home
  • Raw
  • Download

Lines Matching full:tcon

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