Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux-2.6-microblaze.git] / drivers / xen / balloon.c
index e12bb25..fdfc64f 100644 (file)
@@ -44,7 +44,7 @@
 #include <linux/cred.h>
 #include <linux/errno.h>
 #include <linux/mm.h>
-#include <linux/bootmem.h>
+#include <linux/memblock.h>
 #include <linux/pagemap.h>
 #include <linux/highmem.h>
 #include <linux/mutex.h>
@@ -395,7 +395,10 @@ static enum bp_state reserve_additional_memory(void)
         * callers drop the mutex before trying again.
         */
        mutex_unlock(&balloon_mutex);
+       /* add_memory_resource() requires the device_hotplug lock */
+       lock_device_hotplug();
        rc = add_memory_resource(nid, resource, memhp_auto_online);
+       unlock_device_hotplug();
        mutex_lock(&balloon_mutex);
 
        if (rc) {