diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2010-02-22 20:04:55 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-02-25 04:34:51 -0500 |
commit | 96be753af91fc9d582450a84722f6a6721d218ad (patch) | |
tree | 20c1a87a5eab53bfbbd5ffb6954de06ca0af11dd /lib | |
parent | 2676a58c980b7ef076cc9bbff3fd8c9d2d5417ea (diff) |
idr: Apply lockdep-based diagnostics to rcu_dereference() uses
Because idr can be used with any of a number of locks or with
any flavor of RCU, just disable the lockdep-based diagnostics.
If idr needs diagnostics, the check expression will need to be
passed into the relevant idr primitives as an additional
argument.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
LKML-Reference: <1266887105-1528-11-git-send-email-paulmck@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/idr.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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) { |