diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-01-22 08:15:53 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-14 17:27:57 -0500 |
commit | 5346417e17daf5a7712e4cf030b45414e46607cf (patch) | |
tree | 92376f1942a66884685344b587f194a45aca2cb0 /kernel/lockdep.c | |
parent | 36bfb9bb03db2002a8574600c6aeb4cdd1ba01a6 (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.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 18e0990148e6..e68bd7d694b4 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, | |||
2626 | return 0; | 2626 | return 0; |
2627 | 2627 | ||
2628 | switch (new_bit) { | 2628 | switch (new_bit) { |
2629 | case LOCK_USED_IN_HARDIRQ: | 2629 | #define LOCKDEP_STATE(__STATE) \ |
2630 | case LOCK_USED_IN_SOFTIRQ: | 2630 | case LOCK_USED_IN_##__STATE: \ |
2631 | case LOCK_USED_IN_HARDIRQ_READ: | 2631 | case LOCK_USED_IN_##__STATE##_READ: \ |
2632 | case LOCK_USED_IN_SOFTIRQ_READ: | 2632 | case LOCK_ENABLED_##__STATE: \ |
2633 | case LOCK_ENABLED_HARDIRQ: | 2633 | case LOCK_ENABLED_##__STATE##_READ: |
2634 | case LOCK_ENABLED_SOFTIRQ: | 2634 | #include "lockdep_states.h" |
2635 | case LOCK_ENABLED_HARDIRQ_READ: | 2635 | #undef LOCKDEP_STATE |
2636 | case LOCK_ENABLED_SOFTIRQ_READ: | ||
2637 | case LOCK_USED_IN_RECLAIM_FS: | ||
2638 | case LOCK_USED_IN_RECLAIM_FS_READ: | ||
2639 | case LOCK_ENABLED_RECLAIM_FS: | ||
2640 | case LOCK_ENABLED_RECLAIM_FS_READ: | ||
2641 | ret = mark_lock_irq(curr, this, new_bit); | 2636 | ret = mark_lock_irq(curr, this, new_bit); |
2642 | if (!ret) | 2637 | if (!ret) |
2643 | return 0; | 2638 | return 0; |