[PATCH 2/6] LBS: fix uninitialized swapper_space

From: Hugh Dickins
Date: Fri Sep 21 2007 - 16:57:39 EST


Swapping crashed immediately: must initialize new fields of swapper_space.

Signed-off-by: Hugh Dickins <hugh@xxxxxxxxxxx>

--- 2.6.23-rc6-lbs/mm/swap_state.c 2007-07-26 19:49:58.000000000 +0100
+++ linux/mm/swap_state.c 2007-09-13 20:00:45.000000000 +0100
@@ -42,6 +42,10 @@ struct address_space swapper_space = {
.a_ops = &swap_aops,
.i_mmap_nonlinear = LIST_HEAD_INIT(swapper_space.i_mmap_nonlinear),
.backing_dev_info = &swap_backing_dev_info,
+#ifdef CONFIG_LARGE_BLOCKSIZE
+ .shift = PAGE_SHIFT,
+ .offset_mask = PAGE_SIZE - 1,
+#endif
};

#define INC_CACHE_INFO(x) do { swap_cache_info.x++; } while (0)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/