Re: [PATCH] spin_lock_irqsave() in autofs_write() is bogus

From: Linus Torvalds
Date: Sun Aug 17 2025 - 12:50:57 EST


On Sun, 17 Aug 2025 at 09:36, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
> That function should never be (and never is) called with irqs
> disabled - we have an explicit mutex_lock() in there, if nothing else.
> Which makes spin_lock_irqsave() use in there pointless - we do need to
> disable irqs for ->siglock, but that should be spin_lock_irq().

I think we basically did the irqsave/restore version as the default
when not wanting to think about the context.

Your patch looks fine, but I doubt it's measurable outside of "it
makes the code a few bytes smaller".

So ACK on it, but I'm not convinced it's worth spending time actively
_looking_ for these kinds of things.

Linus