mm/swapops: rework swap entry manipulation code
authorAlistair Popple <apopple@nvidia.com>
Thu, 1 Jul 2021 01:54:09 +0000 (18:54 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 1 Jul 2021 18:06:03 +0000 (11:06 -0700)
commit4dd845b5a3e57ad07f26ef808707b064696fe34b
tree6cfe529d45b92923ff4cf7e90762a770822dc691
parentaf5cdaf82238fb3637a0d0fff4670e5be71c611c
mm/swapops: rework swap entry manipulation code

Both migration and device private pages use special swap entries that are
manipluated by a range of inline functions.  The arguments to these are
somewhat inconsistent so rework them to remove flag type arguments and to
make the arguments similar for both read and write entry creation.

Link: https://lkml.kernel.org/r/20210616105937.23201-3-apopple@nvidia.com
Signed-off-by: Alistair Popple <apopple@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Ralph Campbell <rcampbell@nvidia.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Peter Xu <peterx@redhat.com>
Cc: Shakeel Butt <shakeelb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/swapops.h
mm/debug_vm_pgtable.c
mm/hmm.c
mm/huge_memory.c
mm/hugetlb.c
mm/memory.c
mm/migrate.c
mm/mprotect.c
mm/rmap.c