[openib-general] [PATCH] tweaks to canceling MAD based on feedback.
Sean Hefty
mshefty at ichips.intel.com
Wed Sep 29 10:18:53 PDT 2004
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);
}
}
More information about the general
mailing list