Commit 65ea1aff authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] simplify put_page()

By requiring that compound pages implement destructors we can drop some code
from put_page().
parent c8c855b5
......@@ -41,11 +41,10 @@ void put_page(struct page *page)
if (unlikely(PageCompound(page))) {
page = (struct page *)page->private;
if (put_page_testzero(page)) {
if (page[1].mapping) { /* destructor? */
(*(void (*)(struct page *))page[1].mapping)(page);
} else {
__page_cache_release(page);
}
void (*dtor)(struct page *page);
dtor = (void (*)(struct page *))page[1].mapping;
(*dtor)(page);
}
return;
}
......
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