Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17053
b: refs/heads/master
c: de1bb1a
h: refs/heads/master
i:
  17051: 570c13f
v: v3
  • Loading branch information
Sean Hefty authored and Roland Dreier committed Nov 30, 2005
1 parent c4aa90b commit e11375b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 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: 227eca83690da7dcbd698d3268e29402e0571723
refs/heads/master: de1bb1a64c29bae4f5330c70bd1dc6a62954c9f4
3 changes: 2 additions & 1 deletion trunk/drivers/infiniband/core/cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,11 @@ static int cm_alloc_id(struct cm_id_private *cm_id_priv)
{
unsigned long flags;
int ret;
static int next_id;

do {
spin_lock_irqsave(&cm.lock, flags);
ret = idr_get_new_above(&cm.local_id_table, cm_id_priv, 1,
ret = idr_get_new_above(&cm.local_id_table, cm_id_priv, next_id++,
(__force int *) &cm_id_priv->id.local_id);
spin_unlock_irqrestore(&cm.lock, flags);
} while( (ret == -EAGAIN) && idr_pre_get(&cm.local_id_table, GFP_KERNEL) );
Expand Down

0 comments on commit e11375b

Please sign in to comment.