Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b849ff21 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mm: showmem: make the notifiers atomic"

parents 84dad359 5ba88f85
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2014, The Linux Foundation. All rights reserved.
 * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
 */

#include <linux/kernel.h>
@@ -10,21 +10,21 @@
#include <linux/init.h>
#include <linux/show_mem_notifier.h>

static BLOCKING_NOTIFIER_HEAD(show_mem_notifier);
static ATOMIC_NOTIFIER_HEAD(show_mem_notifier);

int show_mem_notifier_register(struct notifier_block *nb)
{
	return blocking_notifier_chain_register(&show_mem_notifier, nb);
	return atomic_notifier_chain_register(&show_mem_notifier, nb);
}

int show_mem_notifier_unregister(struct notifier_block *nb)
{
	return blocking_notifier_chain_unregister(&show_mem_notifier, nb);
	return  atomic_notifier_chain_unregister(&show_mem_notifier, nb);
}

void show_mem_call_notifiers(void)
{
	blocking_notifier_call_chain(&show_mem_notifier, 0, NULL);
	atomic_notifier_call_chain(&show_mem_notifier, 0, NULL);
}

static int show_mem_notifier_get(void *dat, u64 *val)