aboutsummaryrefslogtreecommitdiff
path: root/kernel/lockdep.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-01-22 14:15:53 +0100
committerIngo Molnar <mingo@elte.hu>2009-02-14 23:27:57 +0100
commit5346417e17daf5a7712e4cf030b45414e46607cf (patch)
tree92376f1942a66884685344b587f194a45aca2cb0 /kernel/lockdep.c
parent36bfb9bb03db2002a8574600c6aeb4cdd1ba01a6 (diff)
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>
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r--kernel/lockdep.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 18e0990148e..e68bd7d694b 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -2626,18 +2626,13 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this,
return 0;
switch (new_bit) {
- case LOCK_USED_IN_HARDIRQ:
- case LOCK_USED_IN_SOFTIRQ:
- case LOCK_USED_IN_HARDIRQ_READ:
- case LOCK_USED_IN_SOFTIRQ_READ:
- case LOCK_ENABLED_HARDIRQ:
- case LOCK_ENABLED_SOFTIRQ:
- case LOCK_ENABLED_HARDIRQ_READ:
- 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:
+#define LOCKDEP_STATE(__STATE) \
+ case LOCK_USED_IN_##__STATE: \
+ case LOCK_USED_IN_##__STATE##_READ: \
+ case LOCK_ENABLED_##__STATE: \
+ case LOCK_ENABLED_##__STATE##_READ:
+#include "lockdep_states.h"
+#undef LOCKDEP_STATE
ret = mark_lock_irq(curr, this, new_bit);
if (!ret)
return 0;