vma.c (df2a7df9a9aa32c3df227de346693e6e802c8591) vma.c (b7012d513f81959596a01083415597edb04cf509)
1// SPDX-License-Identifier: GPL-2.0-or-later
2
3/*
4 * VMA-specific functions.
5 */
6
7#include "vma_internal.h"
8#include "vma.h"

--- 163 unchanged lines hidden (view full) ---

172 next ? next->vm_start : USER_PGTABLES_CEILING,
173 mm_wr_locked);
174 tlb_finish_mmu(&tlb);
175}
176
177/*
178 * __split_vma() bypasses sysctl_max_map_count checking. We use this where it
179 * has already been checked or doesn't make sense to fail.
1// SPDX-License-Identifier: GPL-2.0-or-later
2
3/*
4 * VMA-specific functions.
5 */
6
7#include "vma_internal.h"
8#include "vma.h"

--- 163 unchanged lines hidden (view full) ---

172 next ? next->vm_start : USER_PGTABLES_CEILING,
173 mm_wr_locked);
174 tlb_finish_mmu(&tlb);
175}
176
177/*
178 * __split_vma() bypasses sysctl_max_map_count checking. We use this where it
179 * has already been checked or doesn't make sense to fail.
180 * VMA Iterator will point to the end VMA.
180 * VMA Iterator will point to the original VMA.
181 */
182static int __split_vma(struct vma_iterator *vmi, struct vm_area_struct *vma,
183 unsigned long addr, int new_below)
184{
185 struct vma_prepare vp;
186 struct vm_area_struct *new;
187 int err;
188

--- 52 unchanged lines hidden (view full) ---

241 }
242
243 /* vma_complete stores the new vma */
244 vma_complete(&vp, vmi, vma->vm_mm);
245
246 /* Success. */
247 if (new_below)
248 vma_next(vmi);
181 */
182static int __split_vma(struct vma_iterator *vmi, struct vm_area_struct *vma,
183 unsigned long addr, int new_below)
184{
185 struct vma_prepare vp;
186 struct vm_area_struct *new;
187 int err;
188

--- 52 unchanged lines hidden (view full) ---

241 }
242
243 /* vma_complete stores the new vma */
244 vma_complete(&vp, vmi, vma->vm_mm);
245
246 /* Success. */
247 if (new_below)
248 vma_next(vmi);
249 else
250 vma_prev(vmi);
251
249 return 0;
250
251out_free_mpol:
252 mpol_put(vma_policy(new));
253out_free_vmi:
254 vma_iter_free(vmi);
255out_free_vma:
256 vm_area_free(new);

--- 1511 unchanged lines hidden ---
252 return 0;
253
254out_free_mpol:
255 mpol_put(vma_policy(new));
256out_free_vmi:
257 vma_iter_free(vmi);
258out_free_vma:
259 vm_area_free(new);

--- 1511 unchanged lines hidden ---