aboutsummaryrefslogtreecommitdiff
path: root/fs/cifs/transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/transport.c')
-rw-r--r--fs/cifs/transport.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index 9a14f77e0ab..b9eb0cffa00 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -61,10 +61,10 @@ AllocMidQEntry(const struct smb_hdr *smb_buffer, struct TCP_Server_Info *server)
temp->tsk = current;
}
- spin_lock(&GlobalMid_Lock);
- list_add_tail(&temp->qhead, &server->pending_mid_q);
atomic_inc(&midCount);
temp->midState = MID_REQUEST_ALLOCATED;
+ spin_lock(&GlobalMid_Lock);
+ list_add_tail(&temp->qhead, &server->pending_mid_q);
spin_unlock(&GlobalMid_Lock);
return temp;
}
@@ -78,8 +78,8 @@ DeleteMidQEntry(struct mid_q_entry *midEntry)
spin_lock(&GlobalMid_Lock);
midEntry->midState = MID_FREE;
list_del(&midEntry->qhead);
- atomic_dec(&midCount);
spin_unlock(&GlobalMid_Lock);
+ atomic_dec(&midCount);
if (midEntry->largeBuf)
cifs_buf_release(midEntry->resp_buf);
else