• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/fs/cifs/

Lines Matching refs:tcon

103 	   to this tcon */
108 small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
113 /* SMBs NegProt, SessSetup, uLogoff do not have tcon yet so
116 if(tcon) {
117 if(tcon->tidStatus == CifsExiting) {
119 (and ulogoff which does not have tcon)
129 if((tcon->ses) && (tcon->ses->status != CifsExiting) &&
130 (tcon->ses->server)){
135 while(tcon->ses->server->tcpStatus == CifsNeedReconnect) {
136 wait_event_interruptible_timeout(tcon->ses->server->response_q,
137 (tcon->ses->server->tcpStatus == CifsGood), 10 * HZ);
138 if(tcon->ses->server->tcpStatus == CifsNeedReconnect) {
140 if((tcon->retry == FALSE) ||
141 (tcon->ses->status == CifsExiting)) {
155 down(&tcon->ses->sesSem);
156 if(tcon->ses->status == CifsNeedReconnect)
157 rc = cifs_setup_session(0, tcon->ses,
159 if(!rc && (tcon->tidStatus == CifsNeedReconnect)) {
160 mark_open_files_invalid(tcon);
161 rc = CIFSTCon(0, tcon->ses, tcon->treeName,
162 tcon, nls_codepage);
163 up(&tcon->ses->sesSem);
165 if (tcon->ses->capabilities & CAP_UNIX)
167 tcon,
173 cFYI(1, ("reconnect tcon rc = %d", rc));
192 up(&tcon->ses->sesSem);
209 header_assemble((struct smb_hdr *) *request_buf, smb_command, tcon,wct);
211 if(tcon != NULL)
212 cifs_stats_inc(&tcon->num_smbs_sent);
245 smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
251 /* SMBs NegProt, SessSetup, uLogoff do not have tcon yet so
254 if(tcon) {
255 if(tcon->tidStatus == CifsExiting) {
257 (and ulogoff which does not have tcon)
268 if((tcon->ses) && (tcon->ses->status != CifsExiting) &&
269 (tcon->ses->server)){
274 while(tcon->ses->server->tcpStatus == CifsNeedReconnect) {
275 wait_event_interruptible_timeout(tcon->ses->server->response_q,
276 (tcon->ses->server->tcpStatus == CifsGood), 10 * HZ);
277 if(tcon->ses->server->tcpStatus ==
280 if((tcon->retry == FALSE) ||
281 (tcon->ses->status == CifsExiting)) {
295 down(&tcon->ses->sesSem);
296 if(tcon->ses->status == CifsNeedReconnect)
297 rc = cifs_setup_session(0, tcon->ses,
299 if(!rc && (tcon->tidStatus == CifsNeedReconnect)) {
300 mark_open_files_invalid(tcon);
301 rc = CIFSTCon(0, tcon->ses, tcon->treeName,
302 tcon, nls_codepage);
303 up(&tcon->ses->sesSem);
305 if (tcon->ses->capabilities & CAP_UNIX)
307 tcon,
313 cFYI(1, ("reconnect tcon rc = %d", rc));
332 up(&tcon->ses->sesSem);
355 header_assemble((struct smb_hdr *) *request_buf, smb_command, tcon,
358 if(tcon != NULL)
359 cifs_stats_inc(&tcon->num_smbs_sent);
416 rc = smb_init(SMB_COM_NEGOTIATE, 0, NULL /* no tcon yet */ ,
654 CIFSSMBTDis(const int xid, struct cifsTconInfo *tcon)
669 if (tcon)
670 down(&tcon->tconSem);
674 atomic_dec(&tcon->useCount);
675 if (atomic_read(&tcon->useCount) > 0) {
676 up(&tcon->tconSem);
682 if(tcon->tidStatus == CifsNeedReconnect) {
683 up(&tcon->tconSem);
687 if((tcon->ses == NULL) || (tcon->ses->server == NULL)) {
688 up(&tcon->tconSem);
691 rc = small_smb_init(SMB_COM_TREE_DISCONNECT, 0, tcon,
694 up(&tcon->tconSem);
699 rc = SendReceive(xid, tcon->ses, smb_buffer, smb_buffer_response,
706 up(&tcon->tconSem);
777 CIFSSMBDelFile(const int xid, struct cifsTconInfo *tcon, const char *fileName,
787 rc = smb_init(SMB_COM_DELETE, 1, tcon, (void **) &pSMB,
808 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
810 cifs_stats_inc(&tcon->num_deletes);
823 CIFSSMBRmDir(const int xid, struct cifsTconInfo *tcon, const char *dirName,
834 rc = smb_init(SMB_COM_DELETE_DIRECTORY, 0, tcon, (void **) &pSMB,
853 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
855 cifs_stats_inc(&tcon->num_rmdirs);
867 CIFSSMBMkDir(const int xid, struct cifsTconInfo *tcon,
878 rc = smb_init(SMB_COM_CREATE_DIRECTORY, 0, tcon, (void **) &pSMB,
897 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
899 cifs_stats_inc(&tcon->num_mkdirs);
911 CIFSPOSIXCreate(const int xid, struct cifsTconInfo *tcon, __u32 posix_flags,
928 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
978 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
1026 cifs_stats_inc(&tcon->num_mkdirs);
1065 SMBLegacyOpen(const int xid, struct cifsTconInfo *tcon,
1079 rc = smb_init(SMB_COM_OPEN_ANDX, 15, tcon, (void **) &pSMB,
1136 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
1138 cifs_stats_inc(&tcon->num_opens);
1174 CIFSSMBOpen(const int xid, struct cifsTconInfo *tcon,
1188 rc = smb_init(SMB_COM_NT_CREATE_ANDX, 24, tcon, (void **) &pSMB,
1227 if (tcon->ses->capabilities & CAP_UNIX)
1248 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
1250 cifs_stats_inc(&tcon->num_opens);
1277 CIFSSMBRead(const int xid, struct cifsTconInfo *tcon,
1291 if(tcon->ses->capabilities & CAP_LARGE_FILES)
1297 rc = small_smb_init(SMB_COM_READ_ANDX, wct, tcon, (void **) &pSMB);
1301 /* tcon and ses pointer are checked in smb_init */
1302 if (tcon->ses->server == NULL)
1327 rc = SendReceive2(xid, tcon->ses, iov,
1330 cifs_stats_inc(&tcon->num_reads);
1380 CIFSSMBWrite(const int xid, struct cifsTconInfo *tcon,
1393 if(tcon->ses == NULL)
1396 if(tcon->ses->capabilities & CAP_LARGE_FILES)
1401 rc = smb_init(SMB_COM_WRITE_ANDX, wct, tcon, (void **) &pSMB,
1405 /* tcon and ses pointer are checked in smb_init */
1406 if (tcon->ses->server == NULL)
1425 if(tcon->ses->capabilities & CAP_LARGE_WRITE_X) {
1428 bytes_sent = (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE)
1465 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
1467 cifs_stats_inc(&tcon->num_writes);
1486 CIFSSMBWrite2(const int xid, struct cifsTconInfo *tcon,
1499 if(tcon->ses->capabilities & CAP_LARGE_FILES)
1503 rc = small_smb_init(SMB_COM_WRITE_ANDX, wct, tcon, (void **) &pSMB);
1506 /* tcon and ses pointer are checked in smb_init */
1507 if (tcon->ses->server == NULL)
1545 rc = SendReceive2(xid, tcon->ses, iov, n_vec + 1, &resp_buf_type,
1547 cifs_stats_inc(&tcon->num_writes);
1576 CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
1589 rc = small_smb_init(SMB_COM_LOCKING_ANDX, 8, tcon, (void **) &pSMB);
1628 rc = SendReceiveBlockingLock(xid, tcon, (struct smb_hdr *) pSMB,
1631 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
1634 cifs_stats_inc(&tcon->num_locks);
1646 CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon,
1665 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB);
1719 rc = SendReceiveBlockingLock(xid, tcon, (struct smb_hdr *) pSMB,
1722 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
1766 CIFSSMBClose(const int xid, struct cifsTconInfo *tcon, int smb_file_id)
1775 rc = small_smb_init(SMB_COM_CLOSE, 3, tcon, (void **) &pSMB);
1786 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
1788 cifs_stats_inc(&tcon->num_closes);
1806 CIFSSMBRename(const int xid, struct cifsTconInfo *tcon,
1819 rc = smb_init(SMB_COM_RENAME, 1, tcon, (void **) &pSMB,
1859 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
1861 cifs_stats_inc(&tcon->num_renames);
1954 CIFSSMBCopy(const int xid, struct cifsTconInfo *tcon, const char * fromName,
1967 rc = smb_init(SMB_COM_COPY, 1, tcon, (void **) &pSMB,
2006 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
2022 CIFSUnixCreateSymLink(const int xid, struct cifsTconInfo *tcon,
2037 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
2096 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
2098 cifs_stats_inc(&tcon->num_symlinks);
2115 CIFSUnixCreateHardLink(const int xid, struct cifsTconInfo *tcon,
2130 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
2186 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
2188 cifs_stats_inc(&tcon->num_hardlinks);
2201 CIFSCreateHardLink(const int xid, struct cifsTconInfo *tcon,
2215 rc = smb_init(SMB_COM_NT_RENAME, 4, tcon, (void **) &pSMB,
2257 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
2259 cifs_stats_inc(&tcon->num_hardlinks);
2271 CIFSSMBUnixQuerySymLink(const int xid, struct cifsTconInfo *tcon,
2287 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
2330 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
2378 const int parm_len, struct cifsTconInfo *tcon,
2385 rc = small_smb_init(SMB_COM_NT_TRANSACT, 19 + setup_count, tcon,
2393 pSMB->MaxDataCount = cpu_to_le32((tcon->ses->server->maxBuf -
2454 CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon,
2466 rc = smb_init(SMB_COM_NT_TRANSACT, 23, tcon, (void **) &pSMB,
2475 pSMB->MaxDataCount = cpu_to_le32((tcon->ses->server->maxBuf -
2491 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
2687 CIFSSMBGetPosixACL(const int xid, struct cifsTconInfo *tcon,
2703 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
2747 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
2749 cifs_stats_inc(&tcon->num_acl_get);
2774 CIFSSMBSetPosixACL(const int xid, struct cifsTconInfo *tcon,
2790 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
2839 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
2853 CIFSGetExtAttr(const int xid, struct cifsTconInfo *tcon,
2863 if(tcon == NULL)
2867 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
2898 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
2952 CIFSSMBGetCIFSACL(const int xid, struct cifsTconInfo *tcon, __u16 fid,
2964 8 /* parm len */, tcon, (void **) &pSMB);
2979 rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovec */, &buf_type, 0);
2980 cifs_stats_inc(&tcon->num_acl_get);
3025 int SMBQueryInformation(const int xid, struct cifsTconInfo *tcon,
3038 rc = smb_init(SMB_COM_QUERY_INFORMATION, 0, tcon, (void **) &pSMB,
3059 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
3093 CIFSSMBQPathInfo(const int xid, struct cifsTconInfo *tcon,
3109 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
3153 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
3189 CIFSSMBUnixQPathInfo(const int xid, struct cifsTconInfo *tcon,
3204 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
3246 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
3271 /* xid, tcon, searchName and codepage are input parms, rest are returned */
3273 CIFSFindFirst(const int xid, struct cifsTconInfo *tcon,
3291 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
3327 pSMB->MaxDataCount = cpu_to_le16((tcon->ses->server->maxBuf -
3358 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
3360 cifs_stats_inc(&tcon->num_ffirst);
3407 int CIFSFindNext(const int xid, struct cifsTconInfo *tcon,
3423 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
3433 cpu_to_le16((tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE) & 0xFFFFFF00);
3450 /* if (tcon->ses->capabilities & CAP_UNIX) {
3481 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
3483 cifs_stats_inc(&tcon->num_fnext);
3538 CIFSFindClose(const int xid, struct cifsTconInfo *tcon, const __u16 searchHandle)
3546 rc = small_smb_init(SMB_COM_FIND_CLOSE2, 1, tcon, (void **)&pSMB);
3558 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
3563 cifs_stats_inc(&tcon->num_fclose);
3574 CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon,
3586 if(tcon == NULL)
3590 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
3633 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
3849 SMBOldQFSInfo(const int xid, struct cifsTconInfo *tcon, struct kstatfs *FSData)
3861 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
3865 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
3893 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
3934 CIFSSMBQFSInfo(const int xid, struct cifsTconInfo *tcon, struct kstatfs *FSData)
3946 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
3974 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
4014 CIFSSMBQFSAttributeInfo(const int xid, struct cifsTconInfo *tcon)
4026 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
4054 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
4069 memcpy(&tcon->fsAttrInfo, response_data,
4082 CIFSSMBQFSDeviceInfo(const int xid, struct cifsTconInfo *tcon)
4094 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
4123 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
4138 memcpy(&tcon->fsDevInfo, response_data,
4151 CIFSSMBQFSUnixInfo(const int xid, struct cifsTconInfo *tcon)
4163 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
4191 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
4206 memcpy(&tcon->fsUnixInfo, response_data,
4220 CIFSSMBSetFSUnixInfo(const int xid, struct cifsTconInfo *tcon, __u64 cap)
4232 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
4272 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
4293 CIFSSMBQFSPosixInfo(const int xid, struct cifsTconInfo *tcon,
4306 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
4334 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
4380 CIFSSMBSetEOF(const int xid, struct cifsTconInfo *tcon, const char *fileName,
4394 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
4423 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU)
4430 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU)
4455 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
4470 CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size,
4483 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB);
4523 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU)
4530 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU)
4540 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
4564 CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon, const FILE_BASIC_INFO * data,
4575 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB);
4613 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU)
4621 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
4637 CIFSSMBSetTimes(const int xid, struct cifsTconInfo *tcon, const char *fileName,
4652 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
4693 if (tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU)
4701 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
4721 CIFSSMBSetAttrLegacy(int xid, struct cifsTconInfo *tcon, char *fileName,
4733 rc = smb_init(SMB_COM_SETATTR, 8, tcon, (void **) &pSMB,
4753 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
4769 CIFSSMBUnixSetPerms(const int xid, struct cifsTconInfo *tcon,
4784 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
4864 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
4877 int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon,
4889 rc = smb_init(SMB_COM_NT_TRANSACT, 23, tcon, (void **) &pSMB,
4900 pSMB->MaxDataCount = cpu_to_le32((tcon->ses->server->maxBuf -
4918 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
4950 CIFSSMBQAllEAs(const int xid, struct cifsTconInfo *tcon,
4967 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
5008 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
5094 ssize_t CIFSSMBQueryEA(const int xid,struct cifsTconInfo * tcon,
5110 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
5151 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
5242 CIFSSMBSetEA(const int xid, struct cifsTconInfo *tcon, const char *fileName,
5257 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
5331 rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,