Skip to content

Commit 04ccbdc

Browse files
davidhildenbrandbostrovs
authored andcommitted
xen/balloon: Clear PG_offline in balloon_retrieve()
Let's move the clearing to balloon_retrieve(). In bp_state increase_reservation(), we now clear the flag a little earlier than before, however, this should not matter for XEN. Suggested-by: Boris Ostrovsky <[email protected]> Cc: Boris Ostrovsky <[email protected]> Cc: Juergen Gross <[email protected]> Cc: Stefano Stabellini <[email protected]> Signed-off-by: David Hildenbrand <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]> Signed-off-by: Boris Ostrovsky <[email protected]>
1 parent 59b52f1 commit 04ccbdc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/xen/balloon.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ static struct page *balloon_retrieve(bool require_lowmem)
189189
else
190190
balloon_stats.balloon_low--;
191191

192+
__ClearPageOffline(page);
192193
return page;
193194
}
194195

@@ -440,7 +441,6 @@ static enum bp_state increase_reservation(unsigned long nr_pages)
440441
xenmem_reservation_va_mapping_update(1, &page, &frame_list[i]);
441442

442443
/* Relinquish the page back to the allocator. */
443-
__ClearPageOffline(page);
444444
free_reserved_page(page);
445445
}
446446

@@ -606,7 +606,6 @@ int alloc_xenballooned_pages(int nr_pages, struct page **pages)
606606
while (pgno < nr_pages) {
607607
page = balloon_retrieve(true);
608608
if (page) {
609-
__ClearPageOffline(page);
610609
pages[pgno++] = page;
611610
#ifdef CONFIG_XEN_HAVE_PVMMU
612611
/*

0 commit comments

Comments
 (0)