Skip to content

Commit

Permalink
xen/balloon: cancel ballooning if adding new memory failed
Browse files Browse the repository at this point in the history
If the balloon driver is adding additional memory regions to the
balloon and add_memory() fails it will likely continuously fail so
cancel the balloon operation.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
  • Loading branch information
David Vrabel committed Sep 2, 2014
1 parent 61a734d commit 3dcf636
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/xen/balloon.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ static enum bp_state reserve_additional_memory(long credit)
rc = add_memory(nid, hotplug_start_paddr, balloon_hotplug << PAGE_SHIFT);

if (rc) {
pr_info("%s: add_memory() failed: %i\n", __func__, rc);
return BP_EAGAIN;
pr_warn("Cannot add additional memory (%i)\n", rc);
return BP_ECANCELED;
}

balloon_hotplug -= credit;
Expand Down

0 comments on commit 3dcf636

Please sign in to comment.