Skip to content

Commit

Permalink
xmem/tmem: fix 'undefined variable' build error.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Frederico Cadete authored and Konrad Rzeszutek Wilk committed May 28, 2013
1 parent fce9268 commit 1d7004f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/xen/tmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1d7004f

Please sign in to comment.