/* Remove the lock to the list of currently held locks - this gets called on mutex_unlock()/spin_unlock*() (or on a failed mutex_lock_interruptible()). This is done for unlocks that nest perfectly. (i.e. the current top of the lock-stack is unlocked)  */
static void __lock_release(struct lockdep_map *lock, int nested, unsigned long ip)
/* Remove the lock to the list of currently held locks - this gets called on mutex_unlock()/spin_unlock*() (or on a failed mutex_lock_interruptible()). This is done for unlocks that nest perfectly. (i.e. the current top of the lock-stack is unlocked)  */
static void __lock_release(struct lockdep_map *lock, int nested, unsigned long ip)
{
	struct task_struct *curr = current;
	if (!check_unlock(curr, lock, ip))
		return;
	if (nested) {
		if (!lock_release_nested(curr, lock, ip))
			return;
	} else {
		if (!lock_release_non_nested(curr, lock, ip))
			return;
	}
	check_chain_key(curr);
}