Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121491
b: refs/heads/master
c: 8e4f2e8
h: refs/heads/master
i:
  121489: b652689
  121487: 1d37d0e
v: v3
  • Loading branch information
Volker Lendecke authored and Steve French committed Dec 26, 2008
1 parent 46ad2b0 commit 9da51d5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 829049cbb1d2ddda2be17ea008b6b3c457808d91
refs/heads/master: 8e4f2e8a1e5cfa07c5b2731accee0e6eb4c64575
17 changes: 9 additions & 8 deletions trunk/fs/cifs/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,10 +583,8 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses,
wait_for_response(ses, midQ, timeout, 10 * HZ);

spin_lock(&GlobalMid_Lock);
if (midQ->resp_buf) {
spin_unlock(&GlobalMid_Lock);
receive_len = midQ->resp_buf->smb_buf_length;
} else {

if (midQ->resp_buf == NULL) {
cERROR(1, ("No response to cmd %d mid %d",
midQ->command, midQ->mid));
if (midQ->midState == MID_REQUEST_SUBMITTED) {
Expand Down Expand Up @@ -614,6 +612,9 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses,
return rc;
}

spin_unlock(&GlobalMid_Lock);
receive_len = midQ->resp_buf->smb_buf_length;

if (receive_len > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE) {
cERROR(1, ("Frame too large received. Length: %d Xid: %d",
receive_len, xid));
Expand Down Expand Up @@ -773,10 +774,7 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
wait_for_response(ses, midQ, timeout, 10 * HZ);

spin_lock(&GlobalMid_Lock);
if (midQ->resp_buf) {
spin_unlock(&GlobalMid_Lock);
receive_len = midQ->resp_buf->smb_buf_length;
} else {
if (midQ->resp_buf == NULL) {
cERROR(1, ("No response for cmd %d mid %d",
midQ->command, midQ->mid));
if (midQ->midState == MID_REQUEST_SUBMITTED) {
Expand Down Expand Up @@ -804,6 +802,9 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
return rc;
}

spin_unlock(&GlobalMid_Lock);
receive_len = midQ->resp_buf->smb_buf_length;

if (receive_len > CIFSMaxBufSize + MAX_CIFS_HDR_SIZE) {
cERROR(1, ("Frame too large received. Length: %d Xid: %d",
receive_len, xid));
Expand Down

0 comments on commit 9da51d5

Please sign in to comment.