svn commit: linux-cifs-client r69 - in branches/linux-converged-for-old-kernels/fs/cifs: .

jra at samba.org jra at samba.org
Mon Aug 14 22:30:09 GMT 2006


Author: jra
Date: 2006-08-14 22:30:06 +0000 (Mon, 14 Aug 2006)
New Revision: 69

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=69

Log:
Roll back the header_assemble changes to try and keep
closer to the git tree.
Jeremy.

Modified:
   branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h
   branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c
   branches/linux-converged-for-old-kernels/fs/cifs/connect.c
   branches/linux-converged-for-old-kernels/fs/cifs/misc.c
   branches/linux-converged-for-old-kernels/fs/cifs/transport.c


Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h	2006-08-11 22:04:45 UTC (rev 68)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h	2006-08-14 22:30:06 UTC (rev 69)
@@ -76,7 +76,6 @@
 extern int map_smb_to_linux_error(struct smb_hdr *smb);
 extern void header_assemble(struct smb_hdr *, char /* command */ ,
 			    const struct cifsTconInfo *,
-			    __u16 mid,
 			    int /* length of fixed section (word count) in two byte units */);
 extern int small_smb_init_no_tc(const int smb_cmd, const int wct,
 				struct cifsSesInfo *ses,

Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c	2006-08-11 22:04:45 UTC (rev 68)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c	2006-08-14 22:30:06 UTC (rev 69)
@@ -211,8 +211,7 @@
 		return -ENOMEM;
 	}
 
-	header_assemble((struct smb_hdr *) *request_buf, smb_command, tcon,
-		tcon ? GetNextMid(tcon->ses->server) : 0, wct);
+	header_assemble((struct smb_hdr *) *request_buf, smb_command, tcon,wct);
 
         if(tcon != NULL)
                 cifs_stats_inc(&tcon->num_smbs_sent);
@@ -356,7 +355,7 @@
 		*response_buf = *request_buf; 
 
 	header_assemble((struct smb_hdr *) *request_buf, smb_command, tcon,
-			tcon ? GetNextMid(tcon->ses->server) : 0, wct /*wct */ );
+			wct /*wct */ );
 
         if(tcon != NULL)
                 cifs_stats_inc(&tcon->num_smbs_sent);

Modified: branches/linux-converged-for-old-kernels/fs/cifs/connect.c
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/connect.c	2006-08-11 22:04:45 UTC (rev 68)
+++ branches/linux-converged-for-old-kernels/fs/cifs/connect.c	2006-08-14 22:30:06 UTC (rev 69)
@@ -2118,8 +2118,9 @@
 
 	/* send SMBsessionSetup here */
 	header_assemble(smb_buffer, SMB_COM_SESSION_SETUP_ANDX,
-			NULL /* no tCon exists yet */ , GetNextMid(ses->server), 13 /* wct */ );
+			NULL /* no tCon exists yet */ , 13 /* wct */ );
 
+	smb_buffer->Mid = GetNextMid(ses->server);
 	pSMB->req_no_secext.AndXCommand = 0xFF;
 	pSMB->req_no_secext.MaxBufferSize = cpu_to_le16(ses->server->maxBuf);
 	pSMB->req_no_secext.MaxMpxCount = cpu_to_le16(ses->server->maxReq);
@@ -2410,8 +2411,9 @@
 
 	/* send SMBsessionSetup here */
 	header_assemble(smb_buffer, SMB_COM_SESSION_SETUP_ANDX,
-			NULL /* no tCon exists yet */ , GetNextMid(ses->server), 12 /* wct */ );
+			NULL /* no tCon exists yet */ , 12 /* wct */ );
 
+	smb_buffer->Mid = GetNextMid(ses->server);
 	pSMB->req.hdr.Flags2 |= SMBFLG2_EXT_SEC;
 	pSMB->req.hdr.Flags |= (SMBFLG_CASELESS | SMBFLG_CANONICAL_PATH_FORMAT);
 
@@ -2743,8 +2745,9 @@
 
 	/* send SMBsessionSetup here */
 	header_assemble(smb_buffer, SMB_COM_SESSION_SETUP_ANDX,
-			NULL /* no tCon exists yet */ , GetNextMid(ses->server), 12 /* wct */ );
+			NULL /* no tCon exists yet */ , 12 /* wct */ );
 
+	smb_buffer->Mid = GetNextMid(ses->server);
 	pSMB->req.hdr.Flags |= (SMBFLG_CASELESS | SMBFLG_CANONICAL_PATH_FORMAT);
 	pSMB->req.hdr.Flags2 |= SMBFLG2_EXT_SEC;
 	pSMB->req.AndXCommand = 0xFF;
@@ -3131,8 +3134,9 @@
 	smb_buffer_response = smb_buffer;
 
 	header_assemble(smb_buffer, SMB_COM_TREE_CONNECT_ANDX,
-			NULL /*no tid */ , GetNextMid(ses->server), 4 /*wct */ );
+			NULL /*no tid */ , 4 /*wct */ );
 
+	smb_buffer->Mid = GetNextMid(ses->server);
 	smb_buffer->Uid = ses->Suid;
 	pSMB = (TCONX_REQ *) smb_buffer;
 	pSMBr = (TCONX_RSP *) smb_buffer_response;

Modified: branches/linux-converged-for-old-kernels/fs/cifs/misc.c
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/misc.c	2006-08-11 22:04:45 UTC (rev 68)
+++ branches/linux-converged-for-old-kernels/fs/cifs/misc.c	2006-08-14 22:30:06 UTC (rev 69)
@@ -314,7 +314,7 @@
    case it is responsbility of caller to set the mid */
 void
 header_assemble(struct smb_hdr *buffer, char smb_command /* command */ ,
-		const struct cifsTconInfo *treeCon, __u16 mid, int word_count
+		const struct cifsTconInfo *treeCon, int word_count
 		/* length of fixed section (word count) in two byte units  */)
 {
 	struct list_head* temp_item;
@@ -339,7 +339,6 @@
 	buffer->Flags2 = SMBFLG2_KNOWS_LONG_NAMES;
 	buffer->Pid = cpu_to_le16((__u16)current->tgid);
 	buffer->PidHigh = cpu_to_le16((__u16)(current->tgid >> 16));
-	buffer->Mid = mid;
 	spin_lock(&GlobalMid_Lock);
 	spin_unlock(&GlobalMid_Lock);
 	if (treeCon) {
@@ -352,6 +351,7 @@
 			}
 			/* Uid is not converted */
 			buffer->Uid = treeCon->ses->Suid;
+			buffer->Mid = GetNextMid(treeCon->ses->server);
 			if(multiuser_mount != 0) {
 		/* For the multiuser case, there are few obvious technically  */
 		/* possible mechanisms to match the local linux user (uid)    */

Modified: branches/linux-converged-for-old-kernels/fs/cifs/transport.c
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/transport.c	2006-08-11 22:04:45 UTC (rev 68)
+++ branches/linux-converged-for-old-kernels/fs/cifs/transport.c	2006-08-14 22:30:06 UTC (rev 69)
@@ -815,8 +815,10 @@
 {
 	int rc = 0;
 	struct cifsSesInfo *ses = tcon->ses;
+	__u16 mid = in_buf->Mid;
 
-	header_assemble(in_buf, SMB_COM_NT_CANCEL, tcon, in_buf->Mid, 0);
+	header_assemble(in_buf, SMB_COM_NT_CANCEL, tcon, 0);
+	in_buf->Mid = mid;
 	down(&ses->server->tcpSem); 
 	rc = cifs_sign_smb(in_buf, ses->server, &midQ->sequence_number);
 	if (rc) {



More information about the samba-cvs mailing list