diff options
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r-- | fs/cifs/cifssmb.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index e555cb5cf493..459320222cf7 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -415,15 +415,16 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
415 | if(server->secMode & SECMODE_SIGN_REQUIRED) | 415 | if(server->secMode & SECMODE_SIGN_REQUIRED) |
416 | cERROR(1, | 416 | cERROR(1, |
417 | ("Server requires /proc/fs/cifs/PacketSigningEnabled")); | 417 | ("Server requires /proc/fs/cifs/PacketSigningEnabled")); |
418 | server->secMode &= ~(SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED); | 418 | server->secMode &= ~(SECMODE_SIGN_ENABLED | |
419 | SECMODE_SIGN_REQUIRED); | ||
419 | } else if(sign_CIFS_PDUs == 1) { | 420 | } else if(sign_CIFS_PDUs == 1) { |
420 | if((server->secMode & SECMODE_SIGN_REQUIRED) == 0) | 421 | if((server->secMode & SECMODE_SIGN_REQUIRED) == 0) |
421 | server->secMode &= ~(SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED); | 422 | server->secMode &= ~(SECMODE_SIGN_ENABLED | |
423 | SECMODE_SIGN_REQUIRED); | ||
422 | } | 424 | } |
423 | 425 | ||
424 | } | 426 | } |
425 | if (pSMB) | 427 | cifs_buf_release(pSMB); |
426 | cifs_buf_release(pSMB); | ||
427 | return rc; | 428 | return rc; |
428 | } | 429 | } |
429 | 430 | ||
@@ -537,9 +538,8 @@ CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses) | |||
537 | rc = -ESHUTDOWN; | 538 | rc = -ESHUTDOWN; |
538 | } | 539 | } |
539 | } | 540 | } |
540 | if (pSMB) | 541 | up(&ses->sesSem) |
541 | cifs_small_buf_release(pSMB); | 542 | cifs_small_buf_release(pSMB); |
542 | up(&ses->sesSem); | ||
543 | 543 | ||
544 | /* if session dead then we do not need to do ulogoff, | 544 | /* if session dead then we do not need to do ulogoff, |
545 | since server closed smb session, no sense reporting | 545 | since server closed smb session, no sense reporting |
@@ -1796,8 +1796,7 @@ CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon, | |||
1796 | } | 1796 | } |
1797 | } | 1797 | } |
1798 | qreparse_out: | 1798 | qreparse_out: |
1799 | if (pSMB) | 1799 | cifs_buf_release(pSMB); |
1800 | cifs_buf_release(pSMB); | ||
1801 | 1800 | ||
1802 | /* Note: On -EAGAIN error only caller can retry on handle based calls | 1801 | /* Note: On -EAGAIN error only caller can retry on handle based calls |
1803 | since file handle passed in no longer valid */ | 1802 | since file handle passed in no longer valid */ |
@@ -2520,12 +2519,11 @@ findFirstRetry: | |||
2520 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 2519 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
2521 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 2520 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
2522 | 2521 | ||
2523 | if (rc) {/* BB add logic to retry regular search if Unix search rejected unexpectedly by server */ | 2522 | if (rc) {/* BB add logic to retry regular search if Unix search |
2523 | rejected unexpectedly by server */ | ||
2524 | /* BB Add code to handle unsupported level rc */ | 2524 | /* BB Add code to handle unsupported level rc */ |
2525 | cFYI(1, ("Error in FindFirst = %d", rc)); | 2525 | cFYI(1, ("Error in FindFirst = %d", rc)); |
2526 | 2526 | cifs_buf_release(pSMB); | |
2527 | if (pSMB) | ||
2528 | cifs_buf_release(pSMB); | ||
2529 | 2527 | ||
2530 | /* BB eventually could optimize out free and realloc of buf */ | 2528 | /* BB eventually could optimize out free and realloc of buf */ |
2531 | /* for this case */ | 2529 | /* for this case */ |