]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: migrate: introduce a local variable to get the number of pages
authorBaolin Wang <baolin.wang@linux.alibaba.com>
Tue, 24 Aug 2021 00:00:16 +0000 (10:00 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 2 Sep 2021 05:32:29 +0000 (15:32 +1000)
commitcf9ff0cef7ed09781ff224ea1add69308eb95bcc
tree7e65ef407b4d5730f0ebfef58126408d1cabe185
parent2011cec36453f663b7935f8a2a671299defd6b7c
mm: migrate: introduce a local variable to get the number of pages

Use thp_nr_pages() instead of compound_nr() to get the number of pages for
THP page, meanwhile introducing a local variable 'nr_pages' to avoid
getting the number of pages repeatedly.

Link: https://lkml.kernel.org/r/a8e331ac04392ee230c79186330fb05e86a2aa77.1629447552.git.baolin.wang@linux.alibaba.com
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: Yang Shi <shy828301@gmail.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
mm/migrate.c