Re: [PATCH v2 4/4] mm, madvise: use standard madvise locking in madvise_set_anon_name()

From: David Hildenbrand
Date: Tue Jun 24 2025 - 10:08:42 EST


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>

--
Cheers,

David / dhildenb