]> git.baikalelectronics.ru Git - kernel.git/commit
mm: remove redundant check non_swap_entry()
authorRalph Campbell <rcampbell@nvidia.com>
Fri, 7 Aug 2020 06:22:21 +0000 (23:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 Aug 2020 18:33:26 +0000 (11:33 -0700)
commit0393441569ec01555c2f1da7a69ba9a00dfef1d3
treea4e87cc9078652d106387a68a126286365331dec
parentc21de5e1312d4619b5ab0719efa89f7eaf2f2541
mm: remove redundant check non_swap_entry()

In zap_pte_range(), the check for non_swap_entry() and
is_device_private_entry() is unnecessary since the latter is sufficient to
determine if the page is a device private page.  Remove the test for
non_swap_entry() to simplify the code and for clarity.

Signed-off-by: Ralph Campbell <rcampbell@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Acked-by: David Hildenbrand <david@redhat.com>
Link: http://lkml.kernel.org/r/20200615175405.4613-1-rcampbell@nvidia.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory.c