cifs: move locked sections out of DeleteMidQEntry and AllocMidQEntry
authorJeff Layton <jlayton@redhat.com>
Tue, 11 Jan 2011 12:24:02 +0000 (07:24 -0500)
committerSteve French <sfrench@us.ibm.com>
Wed, 19 Jan 2011 17:52:42 +0000 (17:52 +0000)
commitddc8cf8fc718587a3788330bf4f32b379f08b250
tree16d19dfa8f98404ab453e8bb2ef765ec4d67a467
parent8097531a5cb55c6472118da094dc88caf9be66ac
cifs: move locked sections out of DeleteMidQEntry and AllocMidQEntry

In later patches, we're going to need to have finer-grained control
over the addition and removal of these structs from the pending_mid_q
and we'll need to be able to call the destructor while holding the
spinlock. Move the locked sections out of both routines and into
the callers. Fix up current callers of DeleteMidQEntry to call a new
routine that dequeues the entry and then destroys it.

Reviewed-by: Suresh Jayaraman <sjayaraman@suse.de>
Reviewed-by: Pavel Shilovsky <piastryyy@gmail.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/transport.c