diff mbox series

[180/181] mm/migrate: remove cpages-- in migrate_vma_finalize()

Message ID 20201013235839.lCcrWFxQM%akpm@linux-foundation.org (mailing list archive)
State New, archived
Headers show
Series [001/181] compiler-clang: add build check for clang 10.0.1 | expand

Commit Message

Andrew Morton Oct. 13, 2020, 11:58 p.m. UTC
From: Ralph Campbell <rcampbell@nvidia.com>
Subject: mm/migrate: remove cpages-- in migrate_vma_finalize()

The variable struct migrate_vma->cpages is only used in
migrate_vma_setup().  There is no need to decrement it in
migrate_vma_finalize() since it is never checked.

Link: http://lkml.kernel.org/r/20200827190735.12752-1-rcampbell@nvidia.com
Signed-off-by: Ralph Campbell <rcampbell@nvidia.com>
Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: Jerome Glisse <jglisse@redhat.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/migrate.c |    1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

--- a/mm/migrate.c~mm-migrate-remove-cpages-in-migrate_vma_finalize
+++ a/mm/migrate.c
@@ -3077,7 +3077,6 @@  void migrate_vma_finalize(struct migrate
 
 		remove_migration_ptes(page, newpage, false);
 		unlock_page(page);
-		migrate->cpages--;
 
 		if (is_zone_device_page(page))
 			put_page(page);