Skip to contentSkip to conversation

mm/migrate: remove cpages-- in migrate_vma_finalize()

PATCH Applied Ralph Campbell 2 participants 3 messages Aug 27, 2020 – Aug 28, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

This applies to linux-mm and is for Andrew Morton's tree.

 mm/migrate.c | 1 -
 1 file changed, 1 deletion(-)
mm/migrate.c +0 -1
index 0b945c8031be..eb859f7a9811 100644
@@ -3087,7 +3087,6 @@ void migrate_vma_finalize(struct migrate_vma *migrate)
 
 		remove_migration_ptes(page, newpage, false);
 		unlock_page(page);
-		migrate->cpages--;
 
 		if (is_zone_device_page(page))
 			put_page(page);
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 mm/migrate: remove obsolete comment about device public

Device public memory never had an in tree consumer and was removed in commit 25b2995a35b6 ("mm: remove MEMORY_DEVICE_PUBLIC support"). Delete the obsolete comment.

---

This applies to linux-mm and is for Andrew Morton's tree.

 mm/migrate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/migrate.c +1 -1
index eb859f7a9811..34fdd25a26db 100644
@@ -381,7 +381,7 @@ static int expected_page_refs(struct address_space *mapping, struct page *page)
 	int expected_count = 1;
 
 	/*
-	 * Device public or private pages have an extra refcount as they are
+	 * Device private pages have an extra refcount as they are
 	 * ZONE_DEVICE pages.
 	 */
 	expected_count += is_device_private_page(page);
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#2 lore raw

Re: [PATCH] mm/migrate: remove obsolete comment about device public

Quoted 8 lines · Ralph Campbell

Device public memory never had an in tree consumer and was removed in commit 25b2995a35b6 ("mm: remove MEMORY_DEVICE_PUBLIC support"). Delete the obsolete comment.

---

This applies to linux-mm and is for Andrew Morton's tree.

Jason