projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
frontswap: don't call ->init if no ops are registered
[linux-2.6-block.git]
/
mm
/
frontswap.c
diff --git
a/mm/frontswap.c
b/mm/frontswap.c
index 1a97610308cbc28a8b16b6eeb16bd978a71d1be7..279e55b4ed8739f51e49959854555fedb536ddf2 100644
(file)
--- a/
mm/frontswap.c
+++ b/
mm/frontswap.c
@@
-125,6
+125,9
@@
void frontswap_init(unsigned type, unsigned long *map)
* p->frontswap set to something valid to work properly.
*/
frontswap_map_set(sis, map);
+
+ if (!frontswap_enabled())
+ return;
frontswap_ops->init(type);
}