[PATCH v4 2/2] mtd: spi-nor: core: Unprepare after interrupted RWW wait
Miquel Raynal
miquel.raynal at bootlin.com
Tue Aug 25 05:18:19 PDT 2026
Hi Runyu,
On 19/08/2026 at 22:03:37 +08, Runyu Xiao <runyu.xiao at seu.edu.cn> wrote:
> spi_nor_prep_and_lock() calls spi_nor_prep() before waiting. If the wait
> is interrupted, the controller setup is left active.
>
> Call spi_nor_unprep() before returning an error from each helper.
>
> Fixes: 74df43b3f626 ("mtd: spi-nor: Enhance locking to support reads while writes")
> Cc: stable at vger.kernel.org
> Signed-off-by: Runyu Xiao <runyu.xiao at seu.edu.cn>
>
> Changes in v4:
> - Add the cleanup for interrupted RWW waits as a separate patch.
> - Use the original RWW locking commit in Fixes.
There is already a pending patch for that part:
https://lore.kernel.org/linux-mtd/87o6f7mzbq.fsf@bootlin.com/T/#m69e389f70eb3e34c0573bf289cb050825f14b516
Thanks,
Miquèl
More information about the linux-mtd
mailing list