Skip to content

Commit

Permalink
mm/mmap: use hotplug_memory_notifier() directly
Browse files Browse the repository at this point in the history
Since patch 3163462 has already updated the minimum gcc version to 5.1.
The previous problem mentioned in patch f02c696 is not existed. So we
can now revert to use hotplug_memory_notifier() directly rather than
register_hotmemory_notifier().

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
  • Loading branch information
Liu Shixin authored and intel-lab-lkp committed Sep 19, 2022
1 parent 6958075 commit f147c36
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions mm/mmap.c
Expand Up @@ -3744,13 +3744,9 @@ static int reserve_mem_notifier(struct notifier_block *nb,
return NOTIFY_OK;
}

static struct notifier_block reserve_mem_nb = {
.notifier_call = reserve_mem_notifier,
};

static int __meminit init_reserve_notifier(void)
{
if (register_hotmemory_notifier(&reserve_mem_nb))
if (hotplug_memory_notifier(&reserve_mem_notifier, 0))
pr_err("Failed registering memory add/remove notifier for admin reserve\n");

return 0;
Expand Down

0 comments on commit f147c36

Please sign in to comment.