Lines Matching refs:tcon

306 	struct cifs_tcon *tcon;  in cifs_reconnect()  local
336 tcon = list_entry(tmp2, struct cifs_tcon, tcon_list); in cifs_reconnect()
337 tcon->need_reconnect = true; in cifs_reconnect()
2539 static int match_tcon(struct cifs_tcon *tcon, const char *unc) in match_tcon() argument
2541 if (tcon->tidStatus == CifsExiting) in match_tcon()
2543 if (strncmp(tcon->treeName, unc, MAX_TREE_SIZE)) in match_tcon()
2552 struct cifs_tcon *tcon; in cifs_find_tcon() local
2556 tcon = list_entry(tmp, struct cifs_tcon, tcon_list); in cifs_find_tcon()
2557 if (!match_tcon(tcon, unc)) in cifs_find_tcon()
2559 ++tcon->tc_count; in cifs_find_tcon()
2561 return tcon; in cifs_find_tcon()
2568 cifs_put_tcon(struct cifs_tcon *tcon) in cifs_put_tcon() argument
2571 struct cifs_ses *ses = tcon->ses; in cifs_put_tcon()
2573 cifs_dbg(FYI, "%s: tc_count=%d\n", __func__, tcon->tc_count); in cifs_put_tcon()
2575 if (--tcon->tc_count > 0) { in cifs_put_tcon()
2580 list_del_init(&tcon->tcon_list); in cifs_put_tcon()
2585 ses->server->ops->tree_disconnect(xid, tcon); in cifs_put_tcon()
2588 cifs_fscache_release_super_cookie(tcon); in cifs_put_tcon()
2589 tconInfoFree(tcon); in cifs_put_tcon()
2597 struct cifs_tcon *tcon; in cifs_get_tcon() local
2599 tcon = cifs_find_tcon(ses, volume_info->UNC); in cifs_get_tcon()
2600 if (tcon) { in cifs_get_tcon()
2604 if (tcon->seal != volume_info->seal) in cifs_get_tcon()
2606 return tcon; in cifs_get_tcon()
2614 tcon = tconInfoAlloc(); in cifs_get_tcon()
2615 if (tcon == NULL) { in cifs_get_tcon()
2620 tcon->ses = ses; in cifs_get_tcon()
2622 tcon->password = kstrdup(volume_info->password, GFP_KERNEL); in cifs_get_tcon()
2623 if (!tcon->password) { in cifs_get_tcon()
2634 rc = ses->server->ops->tree_connect(xid, ses, volume_info->UNC, tcon, in cifs_get_tcon()
2642 tcon->Flags &= ~SMB_SHARE_IS_IN_DFS; in cifs_get_tcon()
2643 cifs_dbg(FYI, "DFS disabled (%d)\n", tcon->Flags); in cifs_get_tcon()
2645 tcon->seal = volume_info->seal; in cifs_get_tcon()
2651 tcon->retry = volume_info->retry; in cifs_get_tcon()
2652 tcon->nocase = volume_info->nocase; in cifs_get_tcon()
2653 tcon->local_lease = volume_info->local_lease; in cifs_get_tcon()
2654 INIT_LIST_HEAD(&tcon->pending_opens); in cifs_get_tcon()
2657 list_add(&tcon->tcon_list, &ses->tcon_list); in cifs_get_tcon()
2660 cifs_fscache_get_super_cookie(tcon); in cifs_get_tcon()
2662 return tcon; in cifs_get_tcon()
2665 tconInfoFree(tcon); in cifs_get_tcon()
2740 struct cifs_tcon *tcon; in cifs_match_super() local
2751 tcon = tlink_tcon(tlink); in cifs_match_super()
2752 ses = tcon->ses; in cifs_match_super()
2759 !match_tcon(tcon, volume_info->UNC)) { in cifs_match_super()
3074 void reset_cifs_unix_caps(unsigned int xid, struct cifs_tcon *tcon, in reset_cifs_unix_caps() argument
3086 __u64 saved_cap = le64_to_cpu(tcon->fsUnixInfo.Capability); in reset_cifs_unix_caps()
3089 tcon->fsUnixInfo.Capability = 0; in reset_cifs_unix_caps()
3090 tcon->unix_ext = 0; /* Unix Extensions disabled */ in reset_cifs_unix_caps()
3094 tcon->unix_ext = 1; /* Unix Extensions supported */ in reset_cifs_unix_caps()
3096 if (tcon->unix_ext == 0) { in reset_cifs_unix_caps()
3101 if (!CIFSSMBQFSUnixInfo(xid, tcon)) { in reset_cifs_unix_caps()
3102 __u64 cap = le64_to_cpu(tcon->fsUnixInfo.Capability); in reset_cifs_unix_caps()
3164 if (CIFSSMBSetFSUnixInfo(xid, tcon, cap)) { in reset_cifs_unix_caps()
3443 struct cifs_tcon *tcon; in cifs_mount() local
3459 if (tcon) in cifs_mount()
3460 cifs_put_tcon(tcon); in cifs_mount()
3468 tcon = NULL; in cifs_mount()
3493 tcon = cifs_get_tcon(ses, volume_info); in cifs_mount()
3494 if (IS_ERR(tcon)) { in cifs_mount()
3495 rc = PTR_ERR(tcon); in cifs_mount()
3496 tcon = NULL; in cifs_mount()
3501 if (cap_unix(tcon->ses)) { in cifs_mount()
3504 reset_cifs_unix_caps(xid, tcon, cifs_sb, volume_info); in cifs_mount()
3505 if ((tcon->ses->server->tcpStatus == CifsNeedReconnect) && in cifs_mount()
3506 (le64_to_cpu(tcon->fsUnixInfo.Capability) & in cifs_mount()
3512 tcon->unix_ext = 0; /* server does not support them */ in cifs_mount()
3515 if (!tcon->ipc && server->ops->qfs_tcon) in cifs_mount()
3516 server->ops->qfs_tcon(xid, tcon); in cifs_mount()
3518 cifs_sb->wsize = server->ops->negotiate_wsize(tcon, volume_info); in cifs_mount()
3519 cifs_sb->rsize = server->ops->negotiate_rsize(tcon, volume_info); in cifs_mount()
3544 if (!rc && tcon) { in cifs_mount()
3552 full_path = cifs_build_path_to_root(volume_info, cifs_sb, tcon); in cifs_mount()
3557 rc = server->ops->is_path_accessible(xid, tcon, cifs_sb, in cifs_mount()
3603 tlink->tl_tcon = tcon; in cifs_mount()
3621 if (tcon) in cifs_mount()
3622 cifs_put_tcon(tcon); in cifs_mount()
3641 const char *tree, struct cifs_tcon *tcon, in CIFSTCon() argument
3673 if (!tcon || (ses->server->sec_mode & SECMODE_USER)) { in CIFSTCon()
3689 calc_lanman_hash(tcon->password, ses->server->cryptkey, in CIFSTCon()
3695 rc = SMBNTencrypt(tcon->password, ses->server->cryptkey, in CIFSTCon()
3745 if ((rc == 0) && (tcon != NULL)) { in CIFSTCon()
3748 tcon->tidStatus = CifsGood; in CIFSTCon()
3749 tcon->need_reconnect = false; in CIFSTCon()
3750 tcon->tid = smb_buffer_response->Tid; in CIFSTCon()
3765 tcon->ipc = 1; in CIFSTCon()
3775 strlcpy(tcon->treeName, tree, sizeof(tcon->treeName)); in CIFSTCon()
3778 kfree(tcon->nativeFileSystem); in CIFSTCon()
3779 tcon->nativeFileSystem = cifs_strndup_from_utf16(bcc_ptr, in CIFSTCon()
3783 cifs_dbg(FYI, "nativeFileSystem=%s\n", tcon->nativeFileSystem); in CIFSTCon()
3788 tcon->Flags = le16_to_cpu(pSMBr->OptionalSupport); in CIFSTCon()
3790 tcon->Flags = 0; in CIFSTCon()
3791 cifs_dbg(FYI, "Tcon flags: 0x%x\n", tcon->Flags); in CIFSTCon()
3792 } else if ((rc == 0) && tcon == NULL) { in CIFSTCon()
3904 struct cifs_tcon *tcon = NULL; in cifs_construct_tcon() local
3924 tcon = ERR_PTR(rc); in cifs_construct_tcon()
3935 tcon = (struct cifs_tcon *)ses; in cifs_construct_tcon()
3940 tcon = cifs_get_tcon(ses, vol_info); in cifs_construct_tcon()
3941 if (IS_ERR(tcon)) { in cifs_construct_tcon()
3947 reset_cifs_unix_caps(0, tcon, NULL, vol_info); in cifs_construct_tcon()
3953 return tcon; in cifs_construct_tcon()