aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/transport.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index f9e16b39898c..79bf686a2a19 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -41,7 +41,7 @@ AllocMidQEntry(struct smb_hdr *smb_buffer, struct cifsSesInfo *ses)
41 struct mid_q_entry *temp; 41 struct mid_q_entry *temp;
42 42
43 if (ses == NULL) { 43 if (ses == NULL) {
44 cERROR(1, ("Null session passed in to AllocMidQEntry ")); 44 cERROR(1, ("Null session passed in to AllocMidQEntry"));
45 return NULL; 45 return NULL;
46 } 46 }
47 if (ses->server == NULL) { 47 if (ses->server == NULL) {
@@ -185,7 +185,8 @@ smb_send(struct socket *ssocket, struct smb_hdr *smb_buffer,
185 185
186int 186int
187smb_sendv(struct socket *ssocket, struct smb_hdr *smb_buffer, 187smb_sendv(struct socket *ssocket, struct smb_hdr *smb_buffer,
188 unsigned int smb_buf_length, struct kvec * write_vector /* page list */, struct sockaddr *sin) 188 unsigned int smb_buf_length, struct kvec * write_vector
189 /* page list */, struct sockaddr *sin)
189{ 190{
190 int rc = 0; 191 int rc = 0;
191 int i = 0; 192 int i = 0;
@@ -215,7 +216,8 @@ smb_sendv(struct socket *ssocket, struct smb_hdr *smb_buffer,
215 dump_smb(smb_buffer, len); 216 dump_smb(smb_buffer, len);
216 217
217 while (len > 0) { 218 while (len > 0) {
218 rc = kernel_sendmsg(ssocket, &smb_msg, &iov, number_of_pages, len?); 219 rc = kernel_sendmsg(ssocket, &smb_msg, &iov, number_of_pages,
220 len);
219 if ((rc == -ENOSPC) || (rc == -EAGAIN)) { 221 if ((rc == -ENOSPC) || (rc == -EAGAIN)) {
220 i++; 222 i++;
221 if(i > 60) { 223 if(i > 60) {
@@ -351,8 +353,9 @@ CIFSSendRcv(const unsigned int xid, struct cifsSesInfo *ses,
351 rc = cifs_sign_smb(in_buf, ses->server, &midQ->sequence_number); 353 rc = cifs_sign_smb(in_buf, ses->server, &midQ->sequence_number);
352 354
353 midQ->midState = MID_REQUEST_SUBMITTED; 355 midQ->midState = MID_REQUEST_SUBMITTED;
354/* rc = smb_sendv(ses->server->ssocket, in_buf, in_buf->smb_buf_length, piovec, 356/* rc = smb_sendv(ses->server->ssocket, in_buf, in_buf->smb_buf_length,
355 (struct sockaddr *) &(ses->server->addr.sockAddr));*/ 357 piovec,
358 (struct sockaddr *) &(ses->server->addr.sockAddr));*/
356 if(rc < 0) { 359 if(rc < 0) {
357 DeleteMidQEntry(midQ); 360 DeleteMidQEntry(midQ);
358 up(&ses->server->tcpSem); 361 up(&ses->server->tcpSem);
@@ -407,7 +410,8 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
407 } else { 410 } else {
408 spin_lock(&GlobalMid_Lock); 411 spin_lock(&GlobalMid_Lock);
409 while(1) { 412 while(1) {
410 if(atomic_read(&ses->server->inFlight) >= cifs_max_pending){ 413 if(atomic_read(&ses->server->inFlight) >=
414 cifs_max_pending){
411 spin_unlock(&GlobalMid_Lock); 415 spin_unlock(&GlobalMid_Lock);
412 wait_event(ses->server->request_q, 416 wait_event(ses->server->request_q,
413 atomic_read(&ses->server->inFlight) 417 atomic_read(&ses->server->inFlight)
@@ -495,7 +499,7 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
495 up(&ses->server->tcpSem); 499 up(&ses->server->tcpSem);
496 if (long_op == -1) 500 if (long_op == -1)
497 goto cifs_no_response_exit; 501 goto cifs_no_response_exit;
498 else if (long_op == 2) /* writes past end of file can take looooong time */ 502 else if (long_op == 2) /* writes past end of file can take loong time */
499 timeout = 300 * HZ; 503 timeout = 300 * HZ;
500 else if (long_op == 1) 504 else if (long_op == 1)
501 timeout = 45 * HZ; /* should be greater than 505 timeout = 45 * HZ; /* should be greater than
@@ -582,8 +586,8 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
582 ses->server->mac_signing_key, 586 ses->server->mac_signing_key,
583 midQ->sequence_number+1); 587 midQ->sequence_number+1);
584 if(rc) { 588 if(rc) {
585 cERROR(1,("Unexpected packet signature received from server")); 589 cERROR(1,("Unexpected SMB signature"));
586 /* BB FIXME - add code to kill session here */ 590 /* BB FIXME add code to kill session */
587 } 591 }
588 } 592 }
589 593