diff options
author | Liam R. Howlett <[email protected]> | 2024-10-18 13:41:13 -0400 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2024-11-06 20:11:16 -0800 |
commit | 58f1069311db63ed9f330fdba4418a13ab49d843 (patch) | |
tree | 9bae7ae2c9457330b46d0a7ef184dceedbce3312 /tools/perf/scripts/python/libxed.py | |
parent | 38dc8f495246667b543de4cc646fce2925e4cf3b (diff) |
mm/mremap: cleanup vma_to_resize()
Patch series "mm/mremap: Remove extra vma tree walk", v2.
An extra vma tree walk was discovered in some mremap call paths during the
discussion on mseal() changes. This patch set removes the extra vma tree
walk and further cleans up mremap_to().
This patch (of 2):
vma_to_resize() is used in two locations to find and validate the vma for
the mremap location. One of the two locations already has the vma, which
is then re-found to validate the same vma.
This code can be simplified by moving the vma_lookup() from
vma_to_resize() to mremap_to() and changing the return type to an int
error.
Since the function now just validates the vma, the function is renamed to
resize_is_valid() to better reflect what it is doing.
This commit also adds documentation about the function.
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Liam R. Howlett <[email protected]>
Reviewed-by: Pedro Falcato <[email protected]>
Reviewed-by: Lorenzo Stoakes <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: Jann Horn <[email protected]>
Cc: Jeff Xu <[email protected]>
Cc: Kefeng Wang <[email protected]>
Cc: Qi Zheng <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions