Re: [PATCH v3 2/7] mm/lruvec: add irqsave flags into lruvec struct

From: Christoph Hellwig
Date: Fri Nov 22 2019 - 01:47:02 EST


On Sat, Nov 16, 2019 at 11:15:01AM +0800, Alex Shi wrote:
> We need a irqflags vaiable to save state when do irqsave action, declare
> it here would make code more clear/clean.

This patch is wrong on multiple levels. Adding a field without the
users is completely pointless. And as a general pattern we never
add the irqsave flags to sturctures. They are an intimate part of the
calling conventions, and storing them in a structure will lead to
subtile bugs.