]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - mm/swap.c
mm: bdi init hooks
[net-next-2.6.git] / mm / swap.c
index d034b2128d2b09d5182e724a4e655a97804803d0..a65eff8a517af30716ffb863b9866098abeccc3d 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -28,6 +28,7 @@
 #include <linux/percpu.h>
 #include <linux/cpu.h>
 #include <linux/notifier.h>
+#include <linux/backing-dev.h>
 
 /* How many pages do we try to swap or page in/out together? */
 int page_cluster;
@@ -547,6 +548,10 @@ void __init swap_setup(void)
 {
        unsigned long megs = num_physpages >> (20 - PAGE_SHIFT);
 
+#ifdef CONFIG_SWAP
+       bdi_init(swapper_space.backing_dev_info);
+#endif
+
        /* Use a smaller cluster for small-memory machines */
        if (megs < 16)
                page_cluster = 2;