Re: [PATCH] pstore: Convert buf_lock to semaphore
From: Sebastian Andrzej Siewior
Date: Mon Dec 03 2018 - 06:18:29 EST
On 2018-12-01 09:42:38 [+0100], Arnd Bergmann wrote:
> You are right that you can't take (or release) a mutex from interrupt
> context. However, I don't think converting a spinlock to a semaphore
> is going to help here either.
you can acquire a semaphore with a try_lock from interrupts context but
you can't do that with a mutex. You can also a acquire a semaphore in
one context and release in another. Not that I'm a fan of those things
but those two are often the reasons why people stick with a semaphore.
I haven't looked a general picture yet, will try to do so later today or
tomorrow.
> Arnd
Sebastian