tmem: add tmem_disable() function

Instead of manipulating the opt_tmem variable directly utilize a wrapper
function.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This commit is contained in:
Doug Goldstein authored and Konrad Rzeszutek Wilk committed 2016-03-16 10:54:05 -04:00
1 parent 80c4b4c178
commit dba8bfb94d
2 files changed
+7 -2

No files matched your search

+2 -2
View File
@@ -25,7 +25,7 @@
#include <xen/dmi.h>
#include <xen/pfn.h>
#include <xen/nodemask.h>
#include <xen/tmem_xen.h> /* for opt_tmem only */
#include <xen/tmem_xen.h>
#include <xen/watchdog.h>
#include <public/version.h>
#include <compat/platform.h>
@@ -1276,7 +1276,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
{
printk(XENLOG_WARNING
"TMEM physical RAM limit exceeded, disabling TMEM\n");
opt_tmem = 0;
tmem_disable();
}
}
else
+5
View File
@@ -69,6 +69,11 @@ static inline bool_t tmem_enabled(void)
return opt_tmem;
}
static inline void tmem_disable(void)
{
opt_tmem = 0;
}
/*
* Memory free page list management
*/
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.