mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:24:45 +01:00
mm/vma: add page table limit to unmap_region()
The unmap_region() calls need to pass through the page table limit for a future patch. No functional changes intended. Link: https://lkml.kernel.org/r/20260121164946.2093480-7-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Reviewed-by: Pedro Falcato <pfalcato@suse.de> Cc: Baoquan He <bhe@redhat.com> Cc: Barry Song <baohua@kernel.org> Cc: Chris Li <chrisl@kernel.org> Cc: David Hildenbrand <david@kernel.org> Cc: David Hildenbrand <david@redhat.com> Cc: Jann Horn <jannh@google.com> Cc: Kairui Song <kasong@tencent.com> Cc: Kemeng Shi <shikemeng@huaweicloud.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Nhat Pham <nphamcs@gmail.com> Cc: SeongJae Park <sj@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
eda8c5e776
commit
243de0c0dc
2 changed files with 6 additions and 4 deletions
7
mm/vma.c
7
mm/vma.c
|
|
@ -474,7 +474,8 @@ void remove_vma(struct vm_area_struct *vma)
|
|||
*/
|
||||
void unmap_region(struct ma_state *mas, struct vm_area_struct *vma,
|
||||
unsigned long vma_start, unsigned long vma_end,
|
||||
struct vm_area_struct *prev, struct vm_area_struct *next)
|
||||
unsigned long pg_max, struct vm_area_struct *prev,
|
||||
struct vm_area_struct *next)
|
||||
{
|
||||
struct mm_struct *mm = vma->vm_mm;
|
||||
struct mmu_gather tlb;
|
||||
|
|
@ -484,8 +485,7 @@ void unmap_region(struct ma_state *mas, struct vm_area_struct *vma,
|
|||
unmap_vmas(&tlb, mas, vma, vma_start, vma_end, vma_end);
|
||||
mas_set(mas, vma->vm_end);
|
||||
free_pgtables(&tlb, mas, vma, prev ? prev->vm_end : FIRST_USER_ADDRESS,
|
||||
next ? next->vm_start : USER_PGTABLES_CEILING,
|
||||
next ? next->vm_start : USER_PGTABLES_CEILING,
|
||||
pg_max, next ? next->vm_start : USER_PGTABLES_CEILING,
|
||||
/* mm_wr_locked = */ true);
|
||||
tlb_finish_mmu(&tlb);
|
||||
}
|
||||
|
|
@ -2469,6 +2469,7 @@ static int __mmap_new_file_vma(struct mmap_state *map,
|
|||
vma_iter_set(vmi, vma->vm_end);
|
||||
/* Undo any partial mapping done by a device driver. */
|
||||
unmap_region(&vmi->mas, vma, vma->vm_start, vma->vm_end,
|
||||
map->next ? map->next->vm_start : USER_PGTABLES_CEILING,
|
||||
map->prev, map->next);
|
||||
|
||||
return error;
|
||||
|
|
|
|||
3
mm/vma.h
3
mm/vma.h
|
|
@ -265,7 +265,8 @@ void remove_vma(struct vm_area_struct *vma);
|
|||
|
||||
void unmap_region(struct ma_state *mas, struct vm_area_struct *vma,
|
||||
unsigned long vma_start, unsigned long vma_end,
|
||||
struct vm_area_struct *prev, struct vm_area_struct *next);
|
||||
unsigned long pg_max, struct vm_area_struct *prev,
|
||||
struct vm_area_struct *next);
|
||||
|
||||
/**
|
||||
* vma_modify_flags() - Perform any necessary split/merge in preparation for
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue