diff options
author | Steve French <smfrench@austin.rr.com> | 2005-04-29 01:41:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-29 01:41:10 -0400 |
commit | cd63499cbe37e53e6cc084c8a35d911a4613c797 (patch) | |
tree | 5f365aa9daaf89a9890c53dc681474a7fd292e45 /fs/cifs/cifssmb.c | |
parent | 275cde1a1f3880601509c851d72c82bb8d3ee67c (diff) |
[PATCH] cifs: Handle case of multiple trans2 responses for one SMB request (part 2 of 2)
Signed-off-by: Steve French (sfrench@us.ibm.com)
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r-- | fs/cifs/cifssmb.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index a6e66974b286..f8edf816b4be 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -470,7 +470,7 @@ CIFSSMBTDis(const int xid, struct cifsTconInfo *tcon) | |||
470 | return rc; | 470 | return rc; |
471 | } else { | 471 | } else { |
472 | smb_buffer_response = smb_buffer; /* BB removeme BB */ | 472 | smb_buffer_response = smb_buffer; /* BB removeme BB */ |
473 | } | 473 | } |
474 | rc = SendReceive(xid, tcon->ses, smb_buffer, smb_buffer_response, | 474 | rc = SendReceive(xid, tcon->ses, smb_buffer, smb_buffer_response, |
475 | &length, 0); | 475 | &length, 0); |
476 | if (rc) | 476 | if (rc) |
@@ -2517,9 +2517,6 @@ findFirstRetry: | |||
2517 | psrch_inf->srch_entries_start = | 2517 | psrch_inf->srch_entries_start = |
2518 | (char *) &pSMBr->hdr.Protocol + | 2518 | (char *) &pSMBr->hdr.Protocol + |
2519 | le16_to_cpu(pSMBr->t2.DataOffset); | 2519 | le16_to_cpu(pSMBr->t2.DataOffset); |
2520 | /* if(le16_to_cpu(pSMBr->t2.DataCount) != le16_to_cpu(pSMBr->t2.TotalDataCount)) { | ||
2521 | cERROR(1,("DC: %d TDC: %d",pSMBr->t2.DataCount,pSMBr->t2.TotalDataCount)); | ||
2522 | } */ /* BB removeme BB */ | ||
2523 | parms = (T2_FFIRST_RSP_PARMS *)((char *) &pSMBr->hdr.Protocol + | 2520 | parms = (T2_FFIRST_RSP_PARMS *)((char *) &pSMBr->hdr.Protocol + |
2524 | le16_to_cpu(pSMBr->t2.ParameterOffset)); | 2521 | le16_to_cpu(pSMBr->t2.ParameterOffset)); |
2525 | 2522 | ||
@@ -2531,7 +2528,6 @@ findFirstRetry: | |||
2531 | psrch_inf->entries_in_buffer = le16_to_cpu(parms->SearchCount); | 2528 | psrch_inf->entries_in_buffer = le16_to_cpu(parms->SearchCount); |
2532 | psrch_inf->index_of_last_entry = | 2529 | psrch_inf->index_of_last_entry = |
2533 | psrch_inf->entries_in_buffer; | 2530 | psrch_inf->entries_in_buffer; |
2534 | /*cFYI(1,("entries in buf %d index_of_last %d",psrch_inf->entries_in_buffer,psrch_inf->index_of_last_entry)); */ /* BB removeme BB */ | ||
2535 | *pnetfid = parms->SearchHandle; | 2531 | *pnetfid = parms->SearchHandle; |
2536 | } else { | 2532 | } else { |
2537 | cifs_buf_release(pSMB); | 2533 | cifs_buf_release(pSMB); |
@@ -3451,11 +3447,13 @@ CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size, | |||
3451 | 3447 | ||
3452 | cFYI(1, ("SetFileSize (via SetFileInfo) %lld", | 3448 | cFYI(1, ("SetFileSize (via SetFileInfo) %lld", |
3453 | (long long)size)); | 3449 | (long long)size)); |
3454 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 3450 | rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); |
3455 | (void **) &pSMBr); | 3451 | |
3456 | if (rc) | 3452 | if (rc) |
3457 | return rc; | 3453 | return rc; |
3458 | 3454 | ||
3455 | pSMBr = (struct smb_com_transaction2_sfi_rsp *)pSMB; | ||
3456 | |||
3459 | pSMB->hdr.Pid = cpu_to_le16((__u16)pid_of_opener); | 3457 | pSMB->hdr.Pid = cpu_to_le16((__u16)pid_of_opener); |
3460 | pSMB->hdr.PidHigh = cpu_to_le16((__u16)(pid_of_opener >> 16)); | 3458 | pSMB->hdr.PidHigh = cpu_to_le16((__u16)(pid_of_opener >> 16)); |
3461 | 3459 | ||
@@ -3515,7 +3513,7 @@ CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size, | |||
3515 | } | 3513 | } |
3516 | 3514 | ||
3517 | if (pSMB) | 3515 | if (pSMB) |
3518 | cifs_buf_release(pSMB); | 3516 | cifs_small_buf_release(pSMB); |
3519 | 3517 | ||
3520 | /* Note: On -EAGAIN error only caller can retry on handle based calls | 3518 | /* Note: On -EAGAIN error only caller can retry on handle based calls |
3521 | since file handle passed in no longer valid */ | 3519 | since file handle passed in no longer valid */ |
@@ -3541,11 +3539,13 @@ CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon, const FILE_BASIC_I | |||
3541 | __u16 params, param_offset, offset, byte_count, count; | 3539 | __u16 params, param_offset, offset, byte_count, count; |
3542 | 3540 | ||
3543 | cFYI(1, ("Set Times (via SetFileInfo)")); | 3541 | cFYI(1, ("Set Times (via SetFileInfo)")); |
3544 | rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, | 3542 | rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); |
3545 | (void **) &pSMBr); | 3543 | |
3546 | if (rc) | 3544 | if (rc) |
3547 | return rc; | 3545 | return rc; |
3548 | 3546 | ||
3547 | pSMBr = (struct smb_com_transaction2_sfi_rsp *)pSMB; | ||
3548 | |||
3549 | /* At this point there is no need to override the current pid | 3549 | /* At this point there is no need to override the current pid |
3550 | with the pid of the opener, but that could change if we someday | 3550 | with the pid of the opener, but that could change if we someday |
3551 | use an existing handle (rather than opening one on the fly) */ | 3551 | use an existing handle (rather than opening one on the fly) */ |
@@ -3591,7 +3591,7 @@ CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon, const FILE_BASIC_I | |||
3591 | cFYI(1,("Send error in Set Time (SetFileInfo) = %d",rc)); | 3591 | cFYI(1,("Send error in Set Time (SetFileInfo) = %d",rc)); |
3592 | } | 3592 | } |
3593 | 3593 | ||
3594 | cifs_buf_release(pSMB); | 3594 | cifs_small_buf_release(pSMB); |
3595 | 3595 | ||
3596 | /* Note: On -EAGAIN error only caller can retry on handle based calls | 3596 | /* Note: On -EAGAIN error only caller can retry on handle based calls |
3597 | since file handle passed in no longer valid */ | 3597 | since file handle passed in no longer valid */ |