]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mm/migrate: remove unnecessary is_zone_device_page() check
authorRalph Campbell <rcampbell@nvidia.com>
Fri, 4 Sep 2020 23:36:04 +0000 (16:36 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 5 Sep 2020 19:14:30 +0000 (12:14 -0700)
commit6128763fc3244d1b4868e5f0aa401f7f987b5c4d
tree3679668d669517484f10efc8461395b6875c6e60
parentad7df764b7e1c7dc64e016da7ada2e3e1bb90700
mm/migrate: remove unnecessary is_zone_device_page() check

Patch series "mm/migrate: preserve soft dirty in remove_migration_pte()".

I happened to notice this from code inspection after seeing Alistair
Popple's patch ("mm/rmap: Fixup copying of soft dirty and uffd ptes").

This patch (of 2):

The check for is_zone_device_page() and is_device_private_page() is
unnecessary since the latter is sufficient to determine if the page is a
device private page.  Simplify the code for easier reading.

Signed-off-by: Ralph Campbell <rcampbell@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Jerome Glisse <jglisse@redhat.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: Bharata B Rao <bharata@linux.ibm.com>
Link: https://lkml.kernel.org/r/20200831212222.22409-1-rcampbell@nvidia.com
Link: https://lkml.kernel.org/r/20200831212222.22409-2-rcampbell@nvidia.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/migrate.c