]> git.hungrycats.org Git - linux/commitdiff
[PATCH] mm: swapper_space.i_mmap_nonlinear
authorHugh Dickins <hugh@veritas.com>
Sat, 5 Jun 2004 03:51:55 +0000 (20:51 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 5 Jun 2004 03:51:55 +0000 (20:51 -0700)
Initialize swapper_space.i_mmap_nonlinear, so mapping_mapped reports false on
it (as it used to do).  Update comment on swapper_space, now more fields are
used than those initialized explicitly.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/swap_state.c

index 13832c945fb14e148d5493fffdeebb9ad2c28c1f..5717135766d9d52bfe89df728ce4129ed588b16f 100644 (file)
@@ -19,7 +19,8 @@
 
 /*
  * swapper_space is a fiction, retained to simplify the path through
- * vmscan's shrink_list.  Only those fields initialized below are used.
+ * vmscan's shrink_list, to make sync_page look nicer, and to allow
+ * future use of radix_tree tags in the swap cache.
  */
 static struct address_space_operations swap_aops = {
        .writepage      = swap_writepage,
@@ -36,6 +37,7 @@ struct address_space swapper_space = {
        .page_tree      = RADIX_TREE_INIT(GFP_ATOMIC),
        .tree_lock      = SPIN_LOCK_UNLOCKED,
        .a_ops          = &swap_aops,
+       .i_mmap_nonlinear = LIST_HEAD_INIT(swapper_space.i_mmap_nonlinear),
        .backing_dev_info = &swap_backing_dev_info,
 };
 EXPORT_SYMBOL(swapper_space);