Re: [PATCH v4 05/17] irq & spin_lock: Add counted interrupt disabling/enabling

Boqun Feng <[email protected]> Tue, 4 Aug 2026 11:20:54 -0700
Newsgroups org.kernel.vger.rust-for-linux,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Tue, Aug 04, 2026 at 09:14:27AM -0700, Boqun Feng wrote:
[...]
> +static __always_inline bool _raw_spin_trylock_irq_disable(raw_spinlock_t *lock)
> +	__cond_acquires(true, lock)
> +{
> +	local_interrupt_disable();
> +	if (_raw_spin_trylock(lock)) {
> +		spin_acquire(&lock->dep_map, 0, 1, _RET_IP_);

This spin_acquire() needs to be removed as spotted by sashiko.

Regards,
Boqun

> +		return true;
> +	}
> +	local_interrupt_enable();
> +	return false;
> +}
> +
[...]