lkml.org 
[lkml]   [2023]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 08/44] mmap: Convert vma_link() vma iterator
Date
From: "Liam R. Howlett" <Liam.Howlett@Oracle.com>

Avoid using the maple tree interface directly.

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
---
mm/mmap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/mmap.c b/mm/mmap.c
index 4a6f42ab3560..00b839cc499e 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -546,10 +546,10 @@ static inline void vma_mas_szero(struct ma_state *mas, unsigned long start,

static int vma_link(struct mm_struct *mm, struct vm_area_struct *vma)
{
- MA_STATE(mas, &mm->mm_mt, 0, 0);
+ VMA_ITERATOR(vmi, mm, 0);
struct address_space *mapping = NULL;

- if (mas_preallocate(&mas, vma, GFP_KERNEL))
+ if (vma_iter_prealloc(&vmi, vma))
return -ENOMEM;

if (vma->vm_file) {
@@ -557,7 +557,7 @@ static int vma_link(struct mm_struct *mm, struct vm_area_struct *vma)
i_mmap_lock_write(mapping);
}

- vma_mas_store(vma, &mas);
+ vma_iter_store(&vmi, vma);

if (mapping) {
__vma_link_file(vma, mapping);
--
2.35.1
\
 
 \ /
  Last update: 2023-03-26 23:29    [W:0.360 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site