patch-2.4.0-prerelease linux/mm/swap_state.c
Next file: linux/mm/swapfile.c
Previous file: linux/mm/shmem.c
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
Fri Dec 29 15:04:27 2000
- Orig file:
v2.4.0-test12/linux/mm/swap_state.c
- Orig date:
Mon Dec 11 17:59:45 2000
diff -u --recursive --new-file v2.4.0-test12/linux/mm/swap_state.c linux/mm/swap_state.c
@@ -29,10 +29,9 @@
};
struct address_space swapper_space = {
- { /* pages */
- &swapper_space.pages, /* .next */
- &swapper_space.pages /* .prev */
- },
+ LIST_HEAD_INIT(swapper_space.clean_pages),
+ LIST_HEAD_INIT(swapper_space.dirty_pages),
+ LIST_HEAD_INIT(swapper_space.locked_pages),
0, /* nrpages */
&swap_aops,
};
@@ -65,7 +64,7 @@
BUG();
if (page->mapping)
BUG();
- flags = page->flags & ~((1 << PG_error) | (1 << PG_dirty) | (1 << PG_referenced) | (1 << PG_arch_1));
+ flags = page->flags & ~((1 << PG_error) | (1 << PG_arch_1));
page->flags = flags | (1 << PG_uptodate);
add_to_page_cache_locked(page, &swapper_space, entry.val);
}
@@ -80,6 +79,7 @@
PAGE_BUG(page);
PageClearSwapCache(page);
+ ClearPageDirty(page);
__remove_inode_page(page);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)