summaryrefslogtreecommitdiff
path: root/include/linux/frontswap.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/frontswap.h')
-rw-r--r--include/linux/frontswap.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/frontswap.h b/include/linux/frontswap.h
index c46d2aa16d81..1d18af034554 100644
--- a/include/linux/frontswap.h
+++ b/include/linux/frontswap.h
@@ -106,8 +106,9 @@ static inline void frontswap_invalidate_area(unsigned type)
static inline void frontswap_init(unsigned type, unsigned long *map)
{
- if (frontswap_enabled())
- __frontswap_init(type, map);
+#ifdef CONFIG_FRONTSWAP
+ __frontswap_init(type, map);
+#endif
}
#endif /* _LINUX_FRONTSWAP_H */