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

Miquel Raynal miquel.raynal at bootlin.com
Wed Mar 11 08:36:36 PDT 2026


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




More information about the linux-mtd mailing list