lkml.org 
[lkml]   [2020]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/4] mm/fork: Pass new vma pointer into copy_page_range()
On Fri, Sep 25, 2020 at 06:25:58PM -0400, Peter Xu wrote:
> This prepares for the future work to trigger early cow on pinned pages during
> fork(). No functional change intended.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
> include/linux/mm.h | 2 +-
> kernel/fork.c | 2 +-
> mm/memory.c | 14 +++++++++-----
> 3 files changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index b2f370f0b420..ae914be004b3 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -1646,7 +1646,7 @@ struct mmu_notifier_range;
> void free_pgd_range(struct mmu_gather *tlb, unsigned long addr,
> unsigned long end, unsigned long floor, unsigned long ceiling);
> int copy_page_range(struct mm_struct *dst, struct mm_struct *src,
> - struct vm_area_struct *vma);
> + struct vm_area_struct *vma, struct vm_area_struct *new);

It makes dst/src mm_struct arguments redundant. There's always vma->vm_mm.

--
Kirill A. Shutemov

\
 
 \ /
  Last update: 2020-09-30 15:31    [W:0.089 / U:8.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site