[PATCH] maybe fix

From: Lorenzo Stoakes
Date: Thu Oct 03 2024 - 05:02:04 EST


---
mm/vma.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/vma.c b/mm/vma.c
index 6abeef9bc2c8..38f69c656825 100644
--- a/mm/vma.c
+++ b/mm/vma.c
@@ -598,13 +598,13 @@ static int commit_merge(struct vma_merge_struct *vmg,
adjust->vm_end);
}

- if (vma_iter_prealloc(vmg->vmi, vmg->vma))
- return -ENOMEM;
-
vma_prepare(&vp);
vma_adjust_trans_huge(vmg->vma, vmg->start, vmg->end, adj_start);
vma_set_range(vmg->vma, vmg->start, vmg->end, vmg->pgoff);

+ if (vma_iter_prealloc(vmg->vmi, vmg->vma))
+ return -ENOMEM;
+
if (expanded)
vma_iter_store(vmg->vmi, vmg->vma);

--
2.46.2