]> git.baikalelectronics.ru Git - kernel.git/commit
mm: remove src/dst mm parameter in copy_page_range()
authorPeter Xu <peterx@redhat.com>
Tue, 13 Oct 2020 23:54:21 +0000 (16:54 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 14 Oct 2020 01:38:32 +0000 (18:38 -0700)
commit8a9f7bf88000fbae50f471c0e3e01a1e29e15140
tree2320da8e94869001c1322fb3a3fd7fc147e78114
parent9541e8c2dedc9afd4504dea873baeb8250dd5b32
mm: remove src/dst mm parameter in copy_page_range()

Both of the mm pointers are not needed after commit fefff6922ac5
("mm/fork: Pass new vma pointer into copy_page_range()").

Jason Gunthorpe also reported that the ordering of copy_page_range() is
odd.  Since working at it, reorder the parameters to be logical, by (1)
always put the dst_* fields to be before src_* fields, and (2) keep the
same type of parameters together.

[peterx@redhat.com: further reorder some parameters and line format, per Jason]
Link: https://lkml.kernel.org/r/20201002192647.7161-1-peterx@redhat.com
[peterx@redhat.com: fix warnings]
Link: https://lkml.kernel.org/r/20201006200138.GA6026@xz-x1
Reported-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Link: https://lkml.kernel.org/r/20200930204950.6668-1-peterx@redhat.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/mm.h
kernel/fork.c
mm/memory.c