Re: [PATCH v2] mtd: spi-nor: scope the exclusive RWW lock
Miquel Raynal <[email protected]>
| Newsgroups | org.infradead.lists.linux-mtd,org.kernel.vger.linux-kernel,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
On 11/08/2026 at 12:13:49 +08, Runyu Xiao <[email protected]> wrote: > spi_nor_rww_start_exclusive() is used as the wait_event_killable() > condition for RWW access. When RWW is busy, it can return false while > still holding nor->lock, which blocks spi_nor_rww_end_exclusive() from > clearing the RWW state. > > Use guard(mutex) here so nor->lock is released before the condition > returns, while the state flags still hand off ownership to the caller. > This keeps the mutex scope aligned with the other RWW start helpers. The diff is now correct, but the commit log is still missing the point. There has been a translation from raw mutexes into scoped helpers, this translation missed one spot. This should be the core of your commit log. Miquèl ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/