Commit e6dfd92e authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Make sync_page use swapper_space again

Revert recent changes to sync_page().  Now that page_mapping() returns
&swapper_space for swapcache pages we don't need to test for PageSwapCache in
sync_page().
parent 8ea360d4
......@@ -121,14 +121,13 @@ static inline int sync_page(struct page *page)
{
struct address_space *mapping;
/*
* FIXME, fercrissake. What is this barrier here for?
*/
smp_mb();
mapping = page_mapping(page);
if (mapping) {
if (mapping->a_ops && mapping->a_ops->sync_page)
return mapping->a_ops->sync_page(page);
} else if (PageSwapCache(page)) {
swap_unplug_io_fn(NULL, page);
}
if (mapping && mapping->a_ops && mapping->a_ops->sync_page)
return mapping->a_ops->sync_page(page);
return 0;
}
......
......@@ -23,6 +23,7 @@
*/
static struct address_space_operations swap_aops = {
.writepage = swap_writepage,
.sync_page = block_sync_page,
.set_page_dirty = __set_page_dirty_nobuffers,
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment