Patch based on feedback from Krishna for canceling a MAD.

-- Index: access/ib_mad.c
===================================================================
--- access/ib_mad.c     (revision 912)
+++ access/ib_mad.c     (working copy)
@@ -1002,7 +1002,7 @@
                        mad_send_wr->refcount--;
                }
 
-               if (mad_send_wr->refcount <= 0) {
+               if (mad_send_wr->refcount == 0) {
                        list_del(&mad_send_wr->agent_send_list);
                        list_add_tail(&mad_send_wr->agent_send_list,
                                      &cancel_list);
@@ -1024,9 +1024,7 @@
                list_del(&mad_send_wr->agent_send_list);
                kfree(mad_send_wr);
 
-               /* Release reference on agent taken when sending. */
-               if (atomic_dec_and_test(&mad_agent_priv->refcount))
-                       wake_up(&mad_agent_priv->wait);
+               atomic_dec(&mad_agent_priv->refcount);
        }
 }
 

_______________________________________________
openib-general mailing list
[EMAIL PROTECTED]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to