Re: [PATCH v7 04/17] mm: modify vma_iter_store{_gfp} to indicate if it's storing a new vma

Vlastimil Babka
2025-01-07T16:48:31Z

On 12/26/24 18:06, Suren Baghdasaryan wrote:
> vma_iter_store() functions can be used both when adding a new vma and
> when updating an existing one. However for existing ones we do not need
> to mark them attached as they are already marked that way. Add a parameter
> to distinguish the usage and skip vma_mark_attached() when not needed.
>
> Signed-off-by: Suren Baghdasaryan <surenb@google.com>

Seems like an overkill? Looks the common case is the "true" case so add a
variant for the false case? Also seems no _store_gfp caller uses false so
that doesn't need to exist anyway?