summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorRalph Campbell <rcampbell@nvidia.com>2020-06-21 15:20:30 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2020-06-21 15:20:30 +1000
commita8f5728b9da9f3d91101fa49300183061776f019 (patch)
tree6287bdde1add035c8ed7f69ff82addb839352316 /mm
parent5b9e8dc989fd1fad3970966a951f9d41cc5b42a7 (diff)
downloadlinux-next-a8f5728b9da9f3d91101fa49300183061776f019.tar.gz
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. Link: http://lkml.kernel.org/r/20200615175405.4613-1-rcampbell@nvidia.com Signed-off-by: Ralph Campbell <rcampbell@nvidia.com> Reviewed-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'mm')
-rw-r--r--mm/memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 87ec87cdc1ff..f1cb61868b1c 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1098,7 +1098,7 @@ again:
}
entry = pte_to_swp_entry(ptent);
- if (non_swap_entry(entry) && is_device_private_entry(entry)) {
+ if (is_device_private_entry(entry)) {
struct page *page = device_private_entry_to_page(entry);
if (unlikely(details && details->check_mapping)) {