aboutsummaryrefslogtreecommitdiffstats
path: root/mm/compaction.c
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2022-04-28 23:16:18 -0700
committerakpm <akpm@linux-foundation.org>2022-04-28 23:16:18 -0700
commit66fe1cf7f581593750931266ad8f57c744e4b750 (patch)
tree656c4a9b1b7bc381320430c9363f69199ddb3f87 /mm/compaction.c
parentc036ddffe4acb0a35d2f999e3a655c89c7a5b512 (diff)
downloadlinux-66fe1cf7f581593750931266ad8f57c744e4b750.tar.gz
mm: compaction: use helper compound_nr in isolate_migratepages_block
Use helper compound_nr to make use of compound_nr when CONFIG_64BIT and simplify the code a bit. Link: https://lkml.kernel.org/r/20220418141253.24298-8-linmiaohe@huawei.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Cc: Charan Teja Kalla <charante@codeaurora.org> Cc: David Hildenbrand <david@redhat.com> Cc: Pintu Kumar <pintu@codeaurora.org> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/compaction.c')
-rw-r--r--mm/compaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/compaction.c b/mm/compaction.c
index 1fc912ec3a98e..55013a2af8175 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -908,7 +908,7 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn,
/* Do not report -EBUSY down the chain */
if (ret == -EBUSY)
ret = 0;
- low_pfn += (1UL << compound_order(page)) - 1;
+ low_pfn += compound_nr(page) - 1;
goto isolate_fail;
}