[PATCH] mm: nommu use compound pages
Now that compound page handling is properly fixed in the VM, move nommu over to using compound pages rather than rolling their own refcounting. nommu vm page refcounting is broken anyway, but there is no need to have divergent code in the core VM now, nor when it gets fixed. Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: David Howells <dhowells@redhat.com> (Needs testing, please). Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
0f8053a509
commit
84097518d1
@@ -15,19 +15,7 @@
|
||||
|
||||
static inline void set_page_refs(struct page *page, int order)
|
||||
{
|
||||
#ifdef CONFIG_MMU
|
||||
set_page_count(page, 1);
|
||||
#else
|
||||
int i;
|
||||
|
||||
/*
|
||||
* We need to reference all the pages for this order, otherwise if
|
||||
* anyone accesses one of the pages with (get/put) it will be freed.
|
||||
* - eg: access_process_vm()
|
||||
*/
|
||||
for (i = 0; i < (1 << order); i++)
|
||||
set_page_count(page + i, 1);
|
||||
#endif /* CONFIG_MMU */
|
||||
}
|
||||
|
||||
static inline void __put_page(struct page *page)
|
||||
|
Reference in New Issue
Block a user