Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232707
b: refs/heads/master
c: 2db7c58
h: refs/heads/master
i:
  232705: 223ac37
  232703: 6dae695
v: v3
  • Loading branch information
Jeff Layton authored and Steve French committed Jan 31, 2011
1 parent 125e9a4 commit 9d3fa5c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 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: 1be912dde772b77aaaa21770eeabb0a7a5e297a6
refs/heads/master: 2db7c5815555d8daabf7d4ab1253ce690852c140
15 changes: 12 additions & 3 deletions trunk/fs/cifs/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,27 +570,34 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses,
#endif

mutex_unlock(&ses->server->srv_mutex);
cifs_small_buf_release(in_buf);

if (rc < 0)
if (rc < 0) {
cifs_small_buf_release(in_buf);
goto out;
}

if (long_op == CIFS_ASYNC_OP)
if (long_op == CIFS_ASYNC_OP) {
cifs_small_buf_release(in_buf);
goto out;
}

rc = wait_for_response(ses->server, midQ);
if (rc != 0) {
send_nt_cancel(ses->server, in_buf, midQ);
spin_lock(&GlobalMid_Lock);
if (midQ->midState == MID_REQUEST_SUBMITTED) {
midQ->callback = DeleteMidQEntry;
spin_unlock(&GlobalMid_Lock);
cifs_small_buf_release(in_buf);
atomic_dec(&ses->server->inFlight);
wake_up(&ses->server->request_q);
return rc;
}
spin_unlock(&GlobalMid_Lock);
}

cifs_small_buf_release(in_buf);

rc = sync_mid_result(midQ, ses->server);
if (rc != 0) {
atomic_dec(&ses->server->inFlight);
Expand Down Expand Up @@ -734,6 +741,7 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,

rc = wait_for_response(ses->server, midQ);
if (rc != 0) {
send_nt_cancel(ses->server, in_buf, midQ);
spin_lock(&GlobalMid_Lock);
if (midQ->midState == MID_REQUEST_SUBMITTED) {
/* no longer considered to be "in-flight" */
Expand Down Expand Up @@ -943,6 +951,7 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifsTconInfo *tcon,

rc = wait_for_response(ses->server, midQ);
if (rc) {
send_nt_cancel(ses->server, in_buf, midQ);
spin_lock(&GlobalMid_Lock);
if (midQ->midState == MID_REQUEST_SUBMITTED) {
/* no longer considered to be "in-flight" */
Expand Down

0 comments on commit 9d3fa5c

Please sign in to comment.