Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182251
b: refs/heads/master
c: 96be753
h: refs/heads/master
i:
  182249: 83c428f
  182247: c81168c
v: v3
  • Loading branch information
Paul E. McKenney authored and Ingo Molnar committed Feb 25, 2010
1 parent 54d2135 commit ac9bbc0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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: 2676a58c980b7ef076cc9bbff3fd8c9d2d5417ea
refs/heads/master: 96be753af91fc9d582450a84722f6a6721d218ad
8 changes: 4 additions & 4 deletions trunk/lib/idr.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ void *idr_find(struct idr *idp, int id)
int n;
struct idr_layer *p;

p = rcu_dereference(idp->top);
p = rcu_dereference_raw(idp->top);
if (!p)
return NULL;
n = (p->layer+1) * IDR_BITS;
Expand All @@ -519,7 +519,7 @@ void *idr_find(struct idr *idp, int id)
while (n > 0 && p) {
n -= IDR_BITS;
BUG_ON(n != p->layer*IDR_BITS);
p = rcu_dereference(p->ary[(id >> n) & IDR_MASK]);
p = rcu_dereference_raw(p->ary[(id >> n) & IDR_MASK]);
}
return((void *)p);
}
Expand Down Expand Up @@ -552,15 +552,15 @@ int idr_for_each(struct idr *idp,
struct idr_layer **paa = &pa[0];

n = idp->layers * IDR_BITS;
p = rcu_dereference(idp->top);
p = rcu_dereference_raw(idp->top);
max = 1 << n;

id = 0;
while (id < max) {
while (n > 0 && p) {
n -= IDR_BITS;
*paa++ = p;
p = rcu_dereference(p->ary[(id >> n) & IDR_MASK]);
p = rcu_dereference_raw(p->ary[(id >> n) & IDR_MASK]);
}

if (p) {
Expand Down

0 comments on commit ac9bbc0

Please sign in to comment.