-static int mark_lock_irq(struct task_struct *curr, struct held_lock *this,
- enum lock_usage_bit new_bit)
-{
- int ret = 1;
-
- switch(new_bit) {
- case LOCK_USED_IN_HARDIRQ:
- return mark_lock_irq_used_in(curr, this, new_bit,
- hardirq_verbose);
- case LOCK_USED_IN_SOFTIRQ:
- return mark_lock_irq_used_in(curr, this, new_bit,
- softirq_verbose);
- case LOCK_USED_IN_RECLAIM_FS:
- return mark_lock_irq_used_in(curr, this, new_bit,
- reclaim_verbose);
-
- case LOCK_USED_IN_HARDIRQ_READ:
- return mark_lock_irq_used_in_read(curr, this, new_bit,
- hardirq_verbose);
- case LOCK_USED_IN_SOFTIRQ_READ:
- return mark_lock_irq_used_in_read(curr, this, new_bit,
- softirq_verbose);
- case LOCK_USED_IN_RECLAIM_FS_READ:
- return mark_lock_irq_used_in_read(curr, this, new_bit,
- reclaim_verbose);
-
- case LOCK_ENABLED_HARDIRQ:
- return mark_lock_irq_enabled(curr, this, new_bit,
- hardirq_verbose);
- case LOCK_ENABLED_SOFTIRQ:
- return mark_lock_irq_enabled(curr, this, new_bit,
- softirq_verbose);
- case LOCK_ENABLED_RECLAIM_FS:
- return mark_lock_irq_enabled(curr, this, new_bit,
- reclaim_verbose);
-
- case LOCK_ENABLED_HARDIRQ_READ:
- return mark_lock_irq_enabled_read(curr, this, new_bit,
- hardirq_verbose);
- case LOCK_ENABLED_SOFTIRQ_READ:
- return mark_lock_irq_enabled_read(curr, this, new_bit,
- softirq_verbose);
- case LOCK_ENABLED_RECLAIM_FS_READ:
- return mark_lock_irq_enabled_read(curr, this, new_bit,
- reclaim_verbose);
-
- default:
- WARN_ON(1);
- break;
- }
-
- return ret;
-}
-