aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/idr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/idr.c b/lib/idr.c
index 0dc782216d4b..2eb1dca03681 100644
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -504,7 +504,7 @@ void *idr_find(struct idr *idp, int id)
504 int n; 504 int n;
505 struct idr_layer *p; 505 struct idr_layer *p;
506 506
507 p = rcu_dereference(idp->top); 507 p = rcu_dereference_raw(idp->top);
508 if (!p) 508 if (!p)
509 return NULL; 509 return NULL;
510 n = (p->layer+1) * IDR_BITS; 510 n = (p->layer+1) * IDR_BITS;
@@ -519,7 +519,7 @@ void *idr_find(struct idr *idp, int id)
519 while (n > 0 && p) { 519 while (n > 0 && p) {
520 n -= IDR_BITS; 520 n -= IDR_BITS;
521 BUG_ON(n != p->layer*IDR_BITS); 521 BUG_ON(n != p->layer*IDR_BITS);
522 p = rcu_dereference(p->ary[(id >> n) & IDR_MASK]); 522 p = rcu_dereference_raw(p->ary[(id >> n) & IDR_MASK]);
523 } 523 }
524 return((void *)p); 524 return((void *)p);
525} 525}
@@ -552,7 +552,7 @@ int idr_for_each(struct idr *idp,
552 struct idr_layer **paa = &pa[0]; 552 struct idr_layer **paa = &pa[0];
553 553
554 n = idp->layers * IDR_BITS; 554 n = idp->layers * IDR_BITS;
555 p = rcu_dereference(idp->top); 555 p = rcu_dereference_raw(idp->top);
556 max = 1 << n; 556 max = 1 << n;
557 557
558 id = 0; 558 id = 0;
@@ -560,7 +560,7 @@ int idr_for_each(struct idr *idp,
560 while (n > 0 && p) { 560 while (n > 0 && p) {
561 n -= IDR_BITS; 561 n -= IDR_BITS;
562 *paa++ = p; 562 *paa++ = p;
563 p = rcu_dereference(p->ary[(id >> n) & IDR_MASK]); 563 p = rcu_dereference_raw(p->ary[(id >> n) & IDR_MASK]);
564 } 564 }
565 565
566 if (p) { 566 if (p) {