Lines Matching full:tcon

70  * release it as any new DFS referrals must go through its IPC tcon.
217 struct cifs_tcon *tcon; in __dfs_mount_share() local
236 else if (WARN_ON(!mnt_ctx->tcon)) in __dfs_mount_share()
242 tcon = mnt_ctx->tcon; in __dfs_mount_share()
243 spin_lock(&tcon->tc_lock); in __dfs_mount_share()
244 if (!tcon->origin_fullpath) { in __dfs_mount_share()
245 tcon->origin_fullpath = origin_fullpath; in __dfs_mount_share()
250 spin_unlock(&tcon->tc_lock); in __dfs_mount_share()
253 queue_delayed_work(dfscache_wq, &tcon->dfs_cache_work, in __dfs_mount_share()
352 struct cifs_tcon *tcon, in tree_connect_dfs_target() argument
357 const struct smb_version_operations *ops = tcon->ses->server->ops; in tree_connect_dfs_target()
358 struct TCP_Server_Info *server = tcon->ses->server; in tree_connect_dfs_target()
388 rc = ops->tree_connect(xid, tcon->ses, tree, in tree_connect_dfs_target()
389 tcon, tcon->ses->local_nls); in tree_connect_dfs_target()
401 int cifs_tree_connect(const unsigned int xid, struct cifs_tcon *tcon, const struct nls_table *nlsc) in cifs_tree_connect() argument
404 struct TCP_Server_Info *server = tcon->ses->server; in cifs_tree_connect()
413 spin_lock(&tcon->tc_lock); in cifs_tree_connect()
415 /* if tcon is marked for needing reconnect, update state */ in cifs_tree_connect()
416 if (tcon->need_reconnect) in cifs_tree_connect()
417 tcon->status = TID_NEED_TCON; in cifs_tree_connect()
419 if (tcon->status == TID_GOOD) { in cifs_tree_connect()
420 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()
424 if (tcon->status != TID_NEW && in cifs_tree_connect()
425 tcon->status != TID_NEED_TCON) { in cifs_tree_connect()
426 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()
430 tcon->status = TID_IN_TCON; in cifs_tree_connect()
431 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()
439 if (tcon->ipc) { in cifs_tree_connect()
443 rc = ops->tree_connect(xid, tcon->ses, tree, tcon, nlsc); in cifs_tree_connect()
447 sb = cifs_get_dfs_tcon_super(tcon); in cifs_tree_connect()
451 /* Tree connect to last share in @tcon->tree_name if no DFS referral */ in cifs_tree_connect()
454 rc = ops->tree_connect(xid, tcon->ses, tcon->tree_name, in cifs_tree_connect()
455 tcon, tcon->ses->local_nls); in cifs_tree_connect()
459 rc = tree_connect_dfs_target(xid, tcon, cifs_sb, tree, ref.server_type == DFS_TYPE_LINK, in cifs_tree_connect()
468 spin_lock(&tcon->tc_lock); in cifs_tree_connect()
469 if (tcon->status == TID_IN_TCON) in cifs_tree_connect()
470 tcon->status = TID_NEED_TCON; in cifs_tree_connect()
471 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()
473 spin_lock(&tcon->tc_lock); in cifs_tree_connect()
474 if (tcon->status == TID_IN_TCON) in cifs_tree_connect()
475 tcon->status = TID_GOOD; in cifs_tree_connect()
476 tcon->need_reconnect = false; in cifs_tree_connect()
477 spin_unlock(&tcon->tc_lock); in cifs_tree_connect()