Re: [PATCH 0/8] mm: introduce zone lock guards

From: Steven Rostedt

Date: Fri Mar 06 2026 - 11:20:12 EST


On Fri, 6 Mar 2026 16:05:34 +0000
Dmitry Ilvokhin <d@xxxxxxxxxxxx> wrote:

> This series defines DEFINE_LOCK_GUARD_1 for zone_lock_irqsave and uses
> it across several mm functions to replace explicit lock/unlock patterns
> with automatic scope-based cleanup.
>
> This simplifies the control flow by removing 'flags' variables, goto
> labels, and redundant unlock calls.
>
> Patches are ordered by decreasing value. The first six patches simplify
> the control flow by removing gotos, multiple unlock paths, or 'ret'
> variables. The last two are simpler lock/unlock pair conversions that
> only remove 'flags' and can be dropped if considered unnecessary churn.
>
> Based on mm-new.
>
> Suggested-by: Steven Rostedt <rostedt@xxxxxxxxxxx>

Thanks, the code looks much cleaner.

Reviewed-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>

-- Steve