diff options
| author | Gerald Schaefer <[email protected]> | 2016-10-07 17:01:10 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2016-10-07 18:46:29 -0700 |
| commit | 082d5b6b60e9f25e1511557fcfcb21eedd267446 (patch) | |
| tree | 96193389b0c0ec724e7cb8ae8c34270642fbd15b /tools/lib/api/fs/tracing_path.c | |
| parent | 2247bb335ab9c40058484cac36ea74ee652f3b7b (diff) | |
mm/hugetlb: check for reserved hugepages during memory offline
In dissolve_free_huge_pages(), free hugepages will be dissolved without
making sure that there are enough of them left to satisfy hugepage
reservations.
Fix this by adding a return value to dissolve_free_huge_pages() and
checking h->free_huge_pages vs. h->resv_huge_pages. Note that this may
lead to the situation where dissolve_free_huge_page() returns an error
and all free hugepages that were dissolved before that error are lost,
while the memory block still cannot be set offline.
Fixes: c8721bbb ("mm: memory-hotplug: enable memory hotplug to handle hugepage")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Gerald Schaefer <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Acked-by: Naoya Horiguchi <[email protected]>
Cc: "Kirill A . Shutemov" <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Mike Kravetz <[email protected]>
Cc: "Aneesh Kumar K . V" <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Rui Teng <[email protected]>
Cc: Dave Hansen <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/lib/api/fs/tracing_path.c')
0 files changed, 0 insertions, 0 deletions