Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133630
b: refs/heads/master
c: 1d9bc6d
h: refs/heads/master
v: v3
  • Loading branch information
Ralph Campbell authored and Roland Dreier committed Feb 27, 2009
1 parent 9670c28 commit 24cd058
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7020cb0fe216fdcec246cdc2412614a3190fbb2f
refs/heads/master: 1d9bc6d648ece77ffb41c5a577eab81fac5ad4de
7 changes: 4 additions & 3 deletions trunk/drivers/infiniband/core/mad.c
Original file line number Diff line number Diff line change
Expand Up @@ -2356,7 +2356,7 @@ static void local_completions(struct work_struct *work)
struct ib_mad_local_private *local;
struct ib_mad_agent_private *recv_mad_agent;
unsigned long flags;
int recv = 0;
int free_mad;
struct ib_wc wc;
struct ib_mad_send_wc mad_send_wc;

Expand All @@ -2370,14 +2370,15 @@ static void local_completions(struct work_struct *work)
completion_list);
list_del(&local->completion_list);
spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
free_mad = 0;
if (local->mad_priv) {
recv_mad_agent = local->recv_mad_agent;
if (!recv_mad_agent) {
printk(KERN_ERR PFX "No receive MAD agent for local completion\n");
free_mad = 1;
goto local_send_completion;
}

recv = 1;
/*
* Defined behavior is to complete response
* before request
Expand Down Expand Up @@ -2422,7 +2423,7 @@ static void local_completions(struct work_struct *work)

spin_lock_irqsave(&mad_agent_priv->lock, flags);
atomic_dec(&mad_agent_priv->refcount);
if (!recv)
if (free_mad)
kmem_cache_free(ib_mad_cache, local->mad_priv);
kfree(local);
}
Expand Down

0 comments on commit 24cd058

Please sign in to comment.