pagewalk: separate function pointers from iterator data
authorChristoph Hellwig <hch@lst.de>
Wed, 28 Aug 2019 14:19:54 +0000 (16:19 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Sat, 7 Sep 2019 07:28:04 +0000 (04:28 -0300)
commit7b86ac3371b70c3fd8fd95501719beb1faab719f
treeb7f61e4615d249563f09567a22ee399634c898dd
parenta520110e4a15ceb385304d9cab22bb51438f6080
pagewalk: separate function pointers from iterator data

The mm_walk structure currently mixed data and code.  Split out the
operations vectors into a new mm_walk_ops structure, and while we are
changing the API also declare the mm_walk structure inside the
walk_page_range and walk_page_vma functions.

Based on patch from Linus Torvalds.

Link: https://lore.kernel.org/r/20190828141955.22210-3-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
13 files changed:
arch/openrisc/kernel/dma.c
arch/powerpc/mm/book3s64/subpage_prot.c
arch/s390/mm/gmap.c
fs/proc/task_mmu.c
include/linux/pagewalk.h
mm/hmm.c
mm/madvise.c
mm/memcontrol.c
mm/mempolicy.c
mm/migrate.c
mm/mincore.c
mm/mprotect.c
mm/pagewalk.c