|
@@ -584,10 +584,6 @@ static int hv_memory_notifier(struct notifier_block *nb, unsigned long val,
|
|
|
|
|
|
switch (val) {
|
|
switch (val) {
|
|
case MEM_ONLINE:
|
|
case MEM_ONLINE:
|
|
- spin_lock_irqsave(&dm_device.ha_lock, flags);
|
|
|
|
- dm_device.num_pages_onlined += mem->nr_pages;
|
|
|
|
- spin_unlock_irqrestore(&dm_device.ha_lock, flags);
|
|
|
|
- /* Fall through */
|
|
|
|
case MEM_CANCEL_ONLINE:
|
|
case MEM_CANCEL_ONLINE:
|
|
if (dm_device.ha_waiting) {
|
|
if (dm_device.ha_waiting) {
|
|
dm_device.ha_waiting = false;
|
|
dm_device.ha_waiting = false;
|
|
@@ -644,6 +640,9 @@ static void hv_page_online_one(struct hv_hotadd_state *has, struct page *pg)
|
|
__online_page_set_limits(pg);
|
|
__online_page_set_limits(pg);
|
|
__online_page_increment_counters(pg);
|
|
__online_page_increment_counters(pg);
|
|
__online_page_free(pg);
|
|
__online_page_free(pg);
|
|
|
|
+
|
|
|
|
+ WARN_ON_ONCE(!spin_is_locked(&dm_device.ha_lock));
|
|
|
|
+ dm_device.num_pages_onlined++;
|
|
}
|
|
}
|
|
|
|
|
|
static void hv_bring_pgs_online(struct hv_hotadd_state *has,
|
|
static void hv_bring_pgs_online(struct hv_hotadd_state *has,
|