Skip to content

Commit 58d0020

Browse files
Mel Gormantorvalds
Mel Gorman
authored andcommitted
mm: compaction: fix return value of capture_free_page()
Commit ef6c5be ("fix incorrect NR_FREE_PAGES accounting (appears like memory leak)") fixes a NR_FREE_PAGE accounting leak but missed the return value which was also missed by this reviewer until today. That return value is used by compaction when adding pages to a list of isolated free pages and without this follow-up fix, there is a risk of free list corruption. Signed-off-by: Mel Gorman <[email protected]> Cc: Dave Hansen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent aa10990 commit 58d0020

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/page_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,7 @@ int capture_free_page(struct page *page, int alloc_order, int migratetype)
14221422
}
14231423
}
14241424

1425-
return 1UL << order;
1425+
return 1UL << alloc_order;
14261426
}
14271427

14281428
/*

0 commit comments

Comments
 (0)