mm: remove redundant assignment of entry
authorWei Yang <richardw.yang@linux.intel.com>
Mon, 23 Sep 2019 22:35:13 +0000 (15:35 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 24 Sep 2019 22:54:08 +0000 (15:54 -0700)
Since ptent will not be changed after previous assignment of entry, it is
not necessary to do the assignment again.

Link: http://lkml.kernel.org/r/20190708082740.21111-1-richardw.yang@linux.intel.com
Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Acked-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Will Deacon <will@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory.c

index b1dff75640b722d4bb40f2be6b76880ef8cb12ef..676020552b32acbede4b70dc8b6b24f48c0789e6 100644 (file)
@@ -1093,7 +1093,6 @@ again:
                if (unlikely(details))
                        continue;
 
-               entry = pte_to_swp_entry(ptent);
                if (!non_swap_entry(entry))
                        rss[MM_SWAPENTS]--;
                else if (is_migration_entry(entry)) {