aboutsummaryrefslogtreecommitdiff
path: root/drivers/xen/balloon.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2016-07-29 21:38:36 +0100
committerMark Brown <broonie@kernel.org>2016-07-29 21:38:36 +0100
commitb0ba6b0a5eb2b51037a07dbf5a7470ca804d575c (patch)
tree0a4c5f048afa1125d8bc242477965cec699f94ee /drivers/xen/balloon.c
parentac248a8b81109d6b41a9338a09538e103f7e31c0 (diff)
parentb05965f284db3e086022f4e318e46cb5bffb1376 (diff)
Merge tag 'v4.4.16' into linux-linaro-lsk-v4.4lsk-v4.4-16.07
This is the 4.4.16 stable release # gpg: Signature made Wed 27 Jul 2016 17:48:38 BST using RSA key ID 6092693E # gpg: requesting key 6092693E from hkp server the.earth.li # gpg: key 6092693E: public key "Greg Kroah-Hartman (Linux kernel stable release signing key) <greg@kroah.com>" imported # gpg: public key of ultimately trusted key B4B0BED6 not found # gpg: 2 marginal(s) needed, 1 complete(s) needed, PGP trust model # gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u # gpg: Total number processed: 1 # gpg: imported: 1 (RSA: 1) # gpg: Good signature from "Greg Kroah-Hartman (Linux kernel stable release signing key) <greg@kroah.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 647F 2865 4894 E3BD 4571 99BE 38DB BDC8 6092 693E
Diffstat (limited to 'drivers/xen/balloon.c')
-rw-r--r--drivers/xen/balloon.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 364bc44610c1..cfab1d24e4bc 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -152,8 +152,6 @@ static DECLARE_WAIT_QUEUE_HEAD(balloon_wq);
static void balloon_process(struct work_struct *work);
static DECLARE_DELAYED_WORK(balloon_worker, balloon_process);
-static void release_memory_resource(struct resource *resource);
-
/* When ballooning out (allocating memory to return to Xen) we don't really
want the kernel to try too hard since that can trigger the oom killer. */
#define GFP_BALLOON \
@@ -249,6 +247,19 @@ static enum bp_state update_schedule(enum bp_state state)
}
#ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG
+static void release_memory_resource(struct resource *resource)
+{
+ if (!resource)
+ return;
+
+ /*
+ * No need to reset region to identity mapped since we now
+ * know that no I/O can be in this region
+ */
+ release_resource(resource);
+ kfree(resource);
+}
+
static struct resource *additional_memory_resource(phys_addr_t size)
{
struct resource *res;
@@ -287,19 +298,6 @@ static struct resource *additional_memory_resource(phys_addr_t size)
return res;
}
-static void release_memory_resource(struct resource *resource)
-{
- if (!resource)
- return;
-
- /*
- * No need to reset region to identity mapped since we now
- * know that no I/O can be in this region
- */
- release_resource(resource);
- kfree(resource);
-}
-
static enum bp_state reserve_additional_memory(void)
{
long credit;