Skip to content

Commit e11f2cc

Browse files
Hugh DickinsLinus Torvalds
authored andcommitted
[PATCH] mm: swapper_space.i_mmap_nonlinear
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>
1 parent e322342 commit e11f2cc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mm/swap_state.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919

2020
/*
2121
* swapper_space is a fiction, retained to simplify the path through
22-
* vmscan's shrink_list. Only those fields initialized below are used.
22+
* vmscan's shrink_list, to make sync_page look nicer, and to allow
23+
* future use of radix_tree tags in the swap cache.
2324
*/
2425
static struct address_space_operations swap_aops = {
2526
.writepage = swap_writepage,
@@ -36,6 +37,7 @@ struct address_space swapper_space = {
3637
.page_tree = RADIX_TREE_INIT(GFP_ATOMIC),
3738
.tree_lock = SPIN_LOCK_UNLOCKED,
3839
.a_ops = &swap_aops,
40+
.i_mmap_nonlinear = LIST_HEAD_INIT(swapper_space.i_mmap_nonlinear),
3941
.backing_dev_info = &swap_backing_dev_info,
4042
};
4143
EXPORT_SYMBOL(swapper_space);

0 commit comments

Comments
 (0)