summaryrefslogtreecommitdiff
path: root/mm/compaction.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2025-05-16 10:58:27 +0300
committerTakashi Iwai <tiwai@suse.de>2025-05-16 10:58:35 +0300
commita3d14d1602ca11429d242d230c31af8f822f614f (patch)
treecb15a4235841e657753505538e6715711e7cd151 /mm/compaction.c
parent1c116e5569ef3bd33be1d6f687b0270c0932838d (diff)
parent7b9938a14460e8ec7649ca2e80ac0aae9815bf02 (diff)
downloadlinux-a3d14d1602ca11429d242d230c31af8f822f614f.tar.xz
Merge branch 'for-linus' into for-next
Back-merge of 6.15 devel branch for further development of HD-audio stuff. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'mm/compaction.c')
-rw-r--r--mm/compaction.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/compaction.c b/mm/compaction.c
index 139f00c0308a..ca71fd3c3181 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -981,13 +981,13 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn,
}
if (PageHuge(page)) {
+ const unsigned int order = compound_order(page);
/*
* skip hugetlbfs if we are not compacting for pages
* bigger than its order. THPs and other compound pages
* are handled below.
*/
if (!cc->alloc_contig) {
- const unsigned int order = compound_order(page);
if (order <= MAX_PAGE_ORDER) {
low_pfn += (1UL << order) - 1;
@@ -1011,8 +1011,8 @@ 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 += compound_nr(page) - 1;
- nr_scanned += compound_nr(page) - 1;
+ low_pfn += (1UL << order) - 1;
+ nr_scanned += (1UL << order) - 1;
goto isolate_fail;
}