On 12.12.2023 10:47, Juergen Gross wrote: > @@ -377,25 +388,25 @@ void _spin_unlock_irqrestore(spinlock_t *lock, unsigned > long flags) > local_irq_restore(flags); > } > > +static int always_inline spin_is_locked_common(const spinlock_tickets_t *t) > +{ > + return t->head != t->tail; > +} > + > int _spin_is_locked(const spinlock_t *lock) > { > - /* > - * Recursive locks may be locked by another CPU, yet we return > - * "false" here, making this function suitable only for use in > - * ASSERT()s and alike. > - */ > - return lock->recurse_cpu == SPINLOCK_NO_CPU > - ? lock->tickets.head != lock->tickets.tail > - : lock->recurse_cpu == smp_processor_id(); > + return spin_is_locked_common(&lock->tickets); > }
This looks like a functional change. I haven't spotted an adjustment in an earlier patch that would make the lost case unnecessary, but even if there was one, the removal thereof would then also want doing there, I think. Jan