diff options
author | Liam R. Howlett <Liam.Howlett@oracle.com> | 2023-07-24 20:31:51 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-08-18 19:12:49 +0200 |
commit | f72cf24a868675280bc555e95abc3639777f8d82 (patch) | |
tree | 22775af1b1baa0e176b7afd5e3681a1f57587049 /mm/mmap.c | |
parent | maple_tree: adjust node allocation on mas_rebalance() (diff) | |
download | linux-f72cf24a868675280bc555e95abc3639777f8d82.tar.xz linux-f72cf24a868675280bc555e95abc3639777f8d82.zip |
mm: use vma_iter_clear_gfp() in nommu
Move the definition of vma_iter_clear_gfp() from mmap.c to internal.h so
it can be used in the nommu code. This will reduce node preallocations
in nommu.
Link: https://lkml.kernel.org/r/20230724183157.3939892-10-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Peng Zhang <zhangpeng.00@bytedance.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/mmap.c')
-rw-r--r-- | mm/mmap.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/mm/mmap.c b/mm/mmap.c index 05e051f87273..1ddb024995df 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -154,18 +154,6 @@ static inline struct vm_area_struct *vma_prev_limit(struct vma_iterator *vmi, return mas_prev(&vmi->mas, min); } -static inline int vma_iter_clear_gfp(struct vma_iterator *vmi, - unsigned long start, unsigned long end, gfp_t gfp) -{ - vmi->mas.index = start; - vmi->mas.last = end - 1; - mas_store_gfp(&vmi->mas, NULL, gfp); - if (unlikely(mas_is_err(&vmi->mas))) - return -ENOMEM; - - return 0; -} - /* * check_brk_limits() - Use platform specific check of range & verify mlock * limits. |