]> err.no Git - linux-2.6/commitdiff
svcrdma: Remove unneeded spin locks from __svc_rdma_free
authorTom Tucker <tom@opengridcomputing.com>
Wed, 28 May 2008 18:20:24 +0000 (13:20 -0500)
committerTom Tucker <tom@opengridcomputing.com>
Wed, 2 Jul 2008 20:01:57 +0000 (15:01 -0500)
At the time __svc_rdma_free is called, we are guaranteed that all references
to this transport are gone. There is, therefore, no need to protect the
resource lists with a spin lock.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
net/sunrpc/xprtrdma/svc_rdma_transport.c

index 6fddd588c0311170e03aa9454014229a680de231..7647789a1f6867773dc4688384e1de06fb84d2fd 100644 (file)
@@ -1027,7 +1027,6 @@ static void __svc_rdma_free(struct work_struct *work)
         * cm_id because the device ptr is needed to unmap the dma in
         * svc_rdma_put_context.
         */
-       spin_lock_bh(&rdma->sc_read_complete_lock);
        while (!list_empty(&rdma->sc_read_complete_q)) {
                struct svc_rdma_op_ctxt *ctxt;
                ctxt = list_entry(rdma->sc_read_complete_q.next,
@@ -1036,10 +1035,8 @@ static void __svc_rdma_free(struct work_struct *work)
                list_del_init(&ctxt->dto_q);
                svc_rdma_put_context(ctxt, 1);
        }
-       spin_unlock_bh(&rdma->sc_read_complete_lock);
 
        /* Destroy queued, but not processed recv completions */
-       spin_lock_bh(&rdma->sc_rq_dto_lock);
        while (!list_empty(&rdma->sc_rq_dto_q)) {
                struct svc_rdma_op_ctxt *ctxt;
                ctxt = list_entry(rdma->sc_rq_dto_q.next,
@@ -1048,7 +1045,6 @@ static void __svc_rdma_free(struct work_struct *work)
                list_del_init(&ctxt->dto_q);
                svc_rdma_put_context(ctxt, 1);
        }
-       spin_unlock_bh(&rdma->sc_rq_dto_lock);
 
        /* Warn if we leaked a resource or under-referenced */
        WARN_ON(atomic_read(&rdma->sc_ctxt_used) != 0);