• Home
  • Raw
  • Download

Lines Matching refs:tcon

289 	struct cifs_tcon *tcon;  in cifs_reconnect()  local
315 tcon = list_entry(tmp2, struct cifs_tcon, tcon_list); in cifs_reconnect()
316 tcon->need_reconnect = true; in cifs_reconnect()
2595 static int match_tcon(struct cifs_tcon *tcon, const char *unc) in match_tcon() argument
2597 if (tcon->tidStatus == CifsExiting) in match_tcon()
2599 if (strncmp(tcon->treeName, unc, MAX_TREE_SIZE)) in match_tcon()
2608 struct cifs_tcon *tcon; in cifs_find_tcon() local
2612 tcon = list_entry(tmp, struct cifs_tcon, tcon_list); in cifs_find_tcon()
2613 if (!match_tcon(tcon, unc)) in cifs_find_tcon()
2615 ++tcon->tc_count; in cifs_find_tcon()
2617 return tcon; in cifs_find_tcon()
2624 cifs_put_tcon(struct cifs_tcon *tcon) in cifs_put_tcon() argument
2627 struct cifs_ses *ses = tcon->ses; in cifs_put_tcon()
2629 cFYI(1, "%s: tc_count=%d\n", __func__, tcon->tc_count); in cifs_put_tcon()
2631 if (--tcon->tc_count > 0) { in cifs_put_tcon()
2636 list_del_init(&tcon->tcon_list); in cifs_put_tcon()
2640 CIFSSMBTDis(xid, tcon); in cifs_put_tcon()
2643 cifs_fscache_release_super_cookie(tcon); in cifs_put_tcon()
2644 tconInfoFree(tcon); in cifs_put_tcon()
2652 struct cifs_tcon *tcon; in cifs_get_tcon() local
2654 tcon = cifs_find_tcon(ses, volume_info->UNC); in cifs_get_tcon()
2655 if (tcon) { in cifs_get_tcon()
2659 if (tcon->seal != volume_info->seal) in cifs_get_tcon()
2662 return tcon; in cifs_get_tcon()
2665 tcon = tconInfoAlloc(); in cifs_get_tcon()
2666 if (tcon == NULL) { in cifs_get_tcon()
2671 tcon->ses = ses; in cifs_get_tcon()
2673 tcon->password = kstrdup(volume_info->password, GFP_KERNEL); in cifs_get_tcon()
2674 if (!tcon->password) { in cifs_get_tcon()
2691 rc = CIFSTCon(xid, ses, volume_info->UNC, tcon, volume_info->local_nls); in cifs_get_tcon()
2698 tcon->Flags &= ~SMB_SHARE_IS_IN_DFS; in cifs_get_tcon()
2699 cFYI(1, "DFS disabled (%d)", tcon->Flags); in cifs_get_tcon()
2701 tcon->seal = volume_info->seal; in cifs_get_tcon()
2706 tcon->retry = volume_info->retry; in cifs_get_tcon()
2707 tcon->nocase = volume_info->nocase; in cifs_get_tcon()
2708 tcon->local_lease = volume_info->local_lease; in cifs_get_tcon()
2711 list_add(&tcon->tcon_list, &ses->tcon_list); in cifs_get_tcon()
2714 cifs_fscache_get_super_cookie(tcon); in cifs_get_tcon()
2716 return tcon; in cifs_get_tcon()
2719 tconInfoFree(tcon); in cifs_get_tcon()
2794 struct cifs_tcon *tcon; in cifs_match_super() local
2808 tcon = tlink_tcon(tlink); in cifs_match_super()
2809 ses = tcon->ses; in cifs_match_super()
2826 !match_tcon(tcon, volume_info->UNC)) { in cifs_match_super()
3138 void reset_cifs_unix_caps(int xid, struct cifs_tcon *tcon, in reset_cifs_unix_caps() argument
3150 __u64 saved_cap = le64_to_cpu(tcon->fsUnixInfo.Capability); in reset_cifs_unix_caps()
3153 tcon->fsUnixInfo.Capability = 0; in reset_cifs_unix_caps()
3154 tcon->unix_ext = 0; /* Unix Extensions disabled */ in reset_cifs_unix_caps()
3158 tcon->unix_ext = 1; /* Unix Extensions supported */ in reset_cifs_unix_caps()
3160 if (tcon->unix_ext == 0) { in reset_cifs_unix_caps()
3165 if (!CIFSSMBQFSUnixInfo(xid, tcon)) { in reset_cifs_unix_caps()
3166 __u64 cap = le64_to_cpu(tcon->fsUnixInfo.Capability); in reset_cifs_unix_caps()
3228 if (CIFSSMBSetFSUnixInfo(xid, tcon, cap)) { in reset_cifs_unix_caps()
3387 cifs_negotiate_wsize(struct cifs_tcon *tcon, struct smb_vol *pvolume_info) in cifs_negotiate_wsize() argument
3389 __u64 unix_cap = le64_to_cpu(tcon->fsUnixInfo.Capability); in cifs_negotiate_wsize()
3390 struct TCP_Server_Info *server = tcon->ses->server; in cifs_negotiate_wsize()
3396 else if (tcon->unix_ext && (unix_cap & CIFS_UNIX_LARGE_WRITE_CAP)) in cifs_negotiate_wsize()
3402 if (!tcon->unix_ext || !(unix_cap & CIFS_UNIX_LARGE_WRITE_CAP)) in cifs_negotiate_wsize()
3426 cifs_negotiate_rsize(struct cifs_tcon *tcon, struct smb_vol *pvolume_info) in cifs_negotiate_rsize() argument
3428 __u64 unix_cap = le64_to_cpu(tcon->fsUnixInfo.Capability); in cifs_negotiate_rsize()
3429 struct TCP_Server_Info *server = tcon->ses->server; in cifs_negotiate_rsize()
3444 if (tcon->unix_ext && (unix_cap & CIFS_UNIX_LARGE_READ_CAP)) in cifs_negotiate_rsize()
3470 is_path_accessible(int xid, struct cifs_tcon *tcon, in is_path_accessible() argument
3480 rc = CIFSSMBQPathInfo(xid, tcon, full_path, pfile_info, in is_path_accessible()
3486 rc = SMBQueryInformation(xid, tcon, full_path, pfile_info, in is_path_accessible()
3667 struct cifs_tcon *tcon; in cifs_mount() local
3683 if (tcon) in cifs_mount()
3684 cifs_put_tcon(tcon); in cifs_mount()
3692 tcon = NULL; in cifs_mount()
3717 tcon = cifs_get_tcon(pSesInfo, volume_info); in cifs_mount()
3718 if (IS_ERR(tcon)) { in cifs_mount()
3719 rc = PTR_ERR(tcon); in cifs_mount()
3720 tcon = NULL; in cifs_mount()
3725 if (tcon->ses->capabilities & CAP_UNIX) { in cifs_mount()
3728 reset_cifs_unix_caps(xid, tcon, cifs_sb, volume_info); in cifs_mount()
3729 if ((tcon->ses->server->tcpStatus == CifsNeedReconnect) && in cifs_mount()
3730 (le64_to_cpu(tcon->fsUnixInfo.Capability) & in cifs_mount()
3736 tcon->unix_ext = 0; /* server does not support them */ in cifs_mount()
3739 if (!tcon->ipc) { in cifs_mount()
3740 CIFSSMBQFSDeviceInfo(xid, tcon); in cifs_mount()
3741 CIFSSMBQFSAttributeInfo(xid, tcon); in cifs_mount()
3744 cifs_sb->wsize = cifs_negotiate_wsize(tcon, volume_info); in cifs_mount()
3745 cifs_sb->rsize = cifs_negotiate_rsize(tcon, volume_info); in cifs_mount()
3770 if (!rc && tcon) { in cifs_mount()
3772 full_path = cifs_build_path_to_root(volume_info, cifs_sb, tcon); in cifs_mount()
3777 rc = is_path_accessible(xid, tcon, cifs_sb, full_path); in cifs_mount()
3823 tlink->tl_tcon = tcon; in cifs_mount()
3841 if (tcon) in cifs_mount()
3842 cifs_put_tcon(tcon); in cifs_mount()
3861 const char *tree, struct cifs_tcon *tcon, in CIFSTCon() argument
3893 if (!tcon || (ses->server->sec_mode & SECMODE_USER)) { in CIFSTCon()
3909 calc_lanman_hash(tcon->password, ses->server->cryptkey, in CIFSTCon()
3915 rc = SMBNTencrypt(tcon->password, ses->server->cryptkey, in CIFSTCon()
3960 if ((rc == 0) && (tcon != NULL)) { in CIFSTCon()
3963 tcon->tidStatus = CifsGood; in CIFSTCon()
3964 tcon->need_reconnect = false; in CIFSTCon()
3965 tcon->tid = smb_buffer_response->Tid; in CIFSTCon()
3980 tcon->ipc = 1; in CIFSTCon()
3990 strncpy(tcon->treeName, tree, MAX_TREE_SIZE); in CIFSTCon()
3993 kfree(tcon->nativeFileSystem); in CIFSTCon()
3994 tcon->nativeFileSystem = cifs_strndup_from_utf16(bcc_ptr, in CIFSTCon()
3998 cFYI(1, "nativeFileSystem=%s", tcon->nativeFileSystem); in CIFSTCon()
4003 tcon->Flags = le16_to_cpu(pSMBr->OptionalSupport); in CIFSTCon()
4005 tcon->Flags = 0; in CIFSTCon()
4006 cFYI(1, "Tcon flags: 0x%x ", tcon->Flags); in CIFSTCon()
4007 } else if ((rc == 0) && tcon == NULL) { in CIFSTCon()
4150 struct cifs_tcon *tcon = NULL; in cifs_construct_tcon() local
4168 tcon = ERR_PTR(rc); in cifs_construct_tcon()
4179 tcon = (struct cifs_tcon *)ses; in cifs_construct_tcon()
4184 tcon = cifs_get_tcon(ses, vol_info); in cifs_construct_tcon()
4185 if (IS_ERR(tcon)) { in cifs_construct_tcon()
4191 reset_cifs_unix_caps(0, tcon, NULL, vol_info); in cifs_construct_tcon()
4197 return tcon; in cifs_construct_tcon()