lockdep: simplify mark_lock()
remove the state iteration Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
36bfb9bb03
commit
5346417e17
|
@ -2626,18 +2626,13 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
switch (new_bit) {
|
switch (new_bit) {
|
||||||
case LOCK_USED_IN_HARDIRQ:
|
#define LOCKDEP_STATE(__STATE) \
|
||||||
case LOCK_USED_IN_SOFTIRQ:
|
case LOCK_USED_IN_##__STATE: \
|
||||||
case LOCK_USED_IN_HARDIRQ_READ:
|
case LOCK_USED_IN_##__STATE##_READ: \
|
||||||
case LOCK_USED_IN_SOFTIRQ_READ:
|
case LOCK_ENABLED_##__STATE: \
|
||||||
case LOCK_ENABLED_HARDIRQ:
|
case LOCK_ENABLED_##__STATE##_READ:
|
||||||
case LOCK_ENABLED_SOFTIRQ:
|
#include "lockdep_states.h"
|
||||||
case LOCK_ENABLED_HARDIRQ_READ:
|
#undef LOCKDEP_STATE
|
||||||
case LOCK_ENABLED_SOFTIRQ_READ:
|
|
||||||
case LOCK_USED_IN_RECLAIM_FS:
|
|
||||||
case LOCK_USED_IN_RECLAIM_FS_READ:
|
|
||||||
case LOCK_ENABLED_RECLAIM_FS:
|
|
||||||
case LOCK_ENABLED_RECLAIM_FS_READ:
|
|
||||||
ret = mark_lock_irq(curr, this, new_bit);
|
ret = mark_lock_irq(curr, this, new_bit);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue