Re: [PATCH v2 4/4] mm, madvise: use standard madvise locking in madvise_set_anon_name()
From: Suren Baghdasaryan
Date: Tue Jun 24 2025 - 10:53:30 EST
On Tue, Jun 24, 2025 at 7:06 AM David Hildenbrand <david@xxxxxxxxxx> wrote:
>
> On 24.06.25 15:03, Vlastimil Babka wrote:
> > Use madvise_lock()/madvise_unlock() in madvise_set_anon_name() in the
> > same way as in do_madvise(). This narrows the lock scope a bit and
> > reuses existing functionality. get_lock_mode() already picks the correct
> > MADVISE_MMAP_WRITE_LOCK mode for __MADV_SET_ANON_VMA_NAME so we can just
> > remove the explicit assignment.
> >
> > Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx>
> > ---
>
> Acked-by: David Hildenbrand <david@xxxxxxxxxx>
Reviewed-by: Suren Baghdasaryan <surenb@xxxxxxxxxx>
>
> --
> Cheers,
>
> David / dhildenb
>