Thread (23 messages) 23 messages, 7 authors, 2026-01-14

Re: [PATCH v4 3/9] mm: update vma_modify_flags() to handle residual flags, document

From: Pedro Falcato <pfalcato@suse.de>
Date: 2025-11-19 16:36:25
Also in: linux-doc, linux-fsdevel, linux-kselftest, linux-mm, lkml

On Tue, Nov 18, 2025 at 10:17:45AM +0000, Lorenzo Stoakes wrote:
The vma_modify_*() family of functions each either perform splits, a merge
or no changes at all in preparation for the requested modification to
occur.

When doing so for a VMA flags change, we currently don't account for any
flags which may remain (for instance, VM_SOFTDIRTY) despite the requested
change in the case that a merge succeeded.

This is made more important by subsequent patches which will introduce the
concept of sticky VMA flags which rely on this behaviour.

This patch fixes this by passing the VMA flags parameter as a pointer and
updating it accordingly on merge and updating callers to accommodate for
this.

Additionally, while we are here, we add kdocs for each of the
vma_modify_*() functions, as the fact that the requested modification is
not performed is confusing so it is useful to make this abundantly
clear.

We also update the VMA userland tests to account for this change.

Signed-off-by: Lorenzo Stoakes <redacted>
Reviewed-by: Pedro Falcato <pfalcato@suse.de>

Quite ugly change, but for the sake of brevity I think we can live it
Temporarily(tm).

-- 
Pedro
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help