Skip to content

Commit

Permalink
mm/migrate: remove cpages-- in migrate_vma_finalize()
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Ralph Campbell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Cc: Jason Gunthorpe <[email protected]>
Cc: Jerome Glisse <[email protected]>
Cc: John Hubbard <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Ralph Campbell authored and torvalds committed Oct 14, 2020
1 parent 67197a4 commit 4257889
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion mm/migrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -3077,7 +3077,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);
Expand Down

0 comments on commit 4257889

Please sign in to comment.