[PATCH] double flush_page_to_ram

Hugh Dickins (hugh@veritas.com)
Thu, 9 May 2002 13:03:52 +0100 (BST)


filemap_nopage and shmem_nopage do flush_page_to_ram before returning
page, but do_no_page also does flush_page_to_ram on any page it slots
into the user address space. It's memory.c's business, remove it from
shmem and filemap (and cut outdated comment from when filemap copied).

Hugh

--- 2.5.14/mm/filemap.c Wed May 8 20:42:40 2002
+++ linux/mm/filemap.c Thu May 9 12:49:10 2002
@@ -1532,12 +1532,7 @@
goto page_not_uptodate;

success:
- /*
- * Found the page and have a reference on it, need to check sharing
- * and possibly copy it over to another page..
- */
mark_page_accessed(page);
- flush_page_to_ram(page);
return page;

no_cached_page:
--- 2.5.14/mm/shmem.c Wed May 1 12:22:32 2002
+++ linux/mm/shmem.c Thu May 9 12:49:25 2002
@@ -638,7 +638,6 @@
if (shmem_getpage(inode, idx, &page))
return page;

- flush_page_to_ram(page);
return(page);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/