Skip to content

Commit a85468b

Browse files
Chen Wanduntorvalds
authored andcommitted
Revert "mm/page_isolation: unset migratetype directly for non Buddy page"
This reverts commit 721fb89. Commit 721fb89 ("mm/page_isolation: unset migratetype directly for non Buddy page") will result memory that should in buddy disappear by mistake. move_freepages_block moves all pages in pageblock instead of pages indicated by input parameter, so if input pages is not in buddy but other pages in pageblock is in buddy, it will result in page out of control. Link: https://lkml.kernel.org/r/20220126024436.13921-1-chenwandun@huawei.com Fixes: 721fb89 ("mm/page_isolation: unset migratetype directly for non Buddy page") Signed-off-by: Chen Wandun <chenwandun@huawei.com> Reported-by: "kernelci.org bot" <bot@kernelci.org> Acked-by: David Hildenbrand <david@redhat.com> Tested-by: Dong Aisheng <aisheng.dong@nxp.com> Tested-by: Francesco Dolcini <francesco.dolcini@toradex.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 1f2cfdd commit a85468b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mm/page_isolation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static void unset_migratetype_isolate(struct page *page, unsigned migratetype)
115115
* onlining - just onlined memory won't immediately be considered for
116116
* allocation.
117117
*/
118-
if (!isolated_page && PageBuddy(page)) {
118+
if (!isolated_page) {
119119
nr_pages = move_freepages_block(zone, page, migratetype, NULL);
120120
__mod_zone_freepage_state(zone, nr_pages, migratetype);
121121
}

0 commit comments

Comments
 (0)