summaryrefslogtreecommitdiffstats
path: root/kernel/memremap.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-01-11 20:43:39 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-11 20:43:39 +0100
commit02ac5d1487115d160fab4c3e61b7edc20a945af9 (patch)
tree08a39341379ce6f1ad4f3997df36c76ee82cee9c /kernel/memremap.c
parentMerge branch 'cls_flower-ARP' (diff)
parentMerge branch 'akpm' (patches from Andrew) (diff)
downloadlinux-02ac5d1487115d160fab4c3e61b7edc20a945af9.tar.xz
linux-02ac5d1487115d160fab4c3e61b7edc20a945af9.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Two AF_* families adding entries to the lockdep tables at the same time. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/memremap.c')
-rw-r--r--kernel/memremap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/memremap.c b/kernel/memremap.c
index b501e390bb34..9ecedc28b928 100644
--- a/kernel/memremap.c
+++ b/kernel/memremap.c
@@ -246,7 +246,9 @@ static void devm_memremap_pages_release(struct device *dev, void *data)
/* pages are dead and unused, undo the arch mapping */
align_start = res->start & ~(SECTION_SIZE - 1);
align_size = ALIGN(resource_size(res), SECTION_SIZE);
+ mem_hotplug_begin();
arch_remove_memory(align_start, align_size);
+ mem_hotplug_done();
untrack_pfn(NULL, PHYS_PFN(align_start), align_size);
pgmap_radix_release(res);
dev_WARN_ONCE(dev, pgmap->altmap && pgmap->altmap->alloc,
@@ -358,7 +360,9 @@ void *devm_memremap_pages(struct device *dev, struct resource *res,
if (error)
goto err_pfn_remap;
+ mem_hotplug_begin();
error = arch_add_memory(nid, align_start, align_size, true);
+ mem_hotplug_done();
if (error)
goto err_add_memory;