Re: [PATCH] mtd: nand: Use scoped_guard for mutex in nand_resume

From: Miquel Raynal

Date: Wed Mar 11 2026 - 11:38:18 EST


On Wed, 11 Mar 2026 00:30:43 +0800, Richard Lyu wrote:
> Refactor nand_resume() to use scoped_guard() instead of explicit
> mutex_lock/unlock. This improves code safety by ensuring the mutex
> is always released through the RAII-based cleanup infrastructure.
>
> The behavior is functionally equivalent. The mutex is released at the
> end of the scoped block, after which wake_up_all() is called to
> preserve the original locking semantics.
>
> [...]

Applied to nand/next, thanks!

[1/1] mtd: nand: Use scoped_guard for mutex in nand_resume
commit: 520886a1a6ca16862a0437b4a8fae133a895a9b8

Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).

Kind regards,
Miquèl