xmem/tmem: fix 'undefined variable' build error.
authorFrederico Cadete <frederico@cadete.eu>
Sat, 25 May 2013 20:48:57 +0000 (22:48 +0200)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 28 May 2013 13:54:48 +0000 (09:54 -0400)
In the (not so useful) kernel configuration where CONFIG_SWAP
is undefined and CONFIG_XEN_SELFBALLOONING is defined,
xen_tmem_init would use undefined variable 'static bool frontswap'.

Added #else to have #define frontswap (0) in the case where
CONFIG_FRONTSWAP is not defined.

Signed-off-by: Frederico Cadete <frederico@cadete.eu>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/tmem.c

index 18e8bd8fa947994e46b5bd8fb9c09eda29918fa8..cc072c66c766523e4191c5cf4cd40762b77645a9 100644 (file)
@@ -41,6 +41,8 @@ module_param(selfballooning, bool, S_IRUGO);
 #ifdef CONFIG_FRONTSWAP
 static bool frontswap __read_mostly = true;
 module_param(frontswap, bool, S_IRUGO);
+#else /* CONFIG_FRONTSWAP */
+#define frontswap (0)
 #endif /* CONFIG_FRONTSWAP */
 
 #ifdef CONFIG_XEN_SELFBALLOONING