mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
2676a58c98
commit
96be753af9
1 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -552,7 +552,7 @@ 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;
|
||||
|
|
@ -560,7 +560,7 @@ int idr_for_each(struct idr *idp,
|
|||
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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue