Re: [PATCH v3 09/18] list: introduce LIST_HEAD_GUARDED

From: Christoph Hellwig

Date: Thu Jul 09 2026 - 02:29:45 EST


On Mon, Jul 06, 2026 at 07:44:11PM +0530, Nilay Shroff wrote:
> Introduce LIST_HEAD_GUARDED(name, lock) to define a struct list_head
> annotated with __guarded_by(lock). This provides a convenient shorthand
> for defining lock-protected list heads and allows compiler context
> analysis to validate accesses to the list against the associated lock.
>
> The new helper also reduces boilerplate and improves consistency across
> callers that annotate struct list_head objects with __guarded_by().

Please put out of subsystem patches to the front of the series.
And maybe send it off separately to Linus and the usual suspects to
see if we can sneak it into 7.2 to make the dependencies easier.