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 <>
Signed-off-by: Andrew Morton <>
Reviewed-by: Jason Gunthorpe <>
Acked-by: David Hildenbrand <>
Signed-off-by: Linus Torvalds <>
1 file changed