summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-04-11 23:13:47 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-04-11 23:13:47 -0700
commit0fcb51fd7ee151a03aab2d07493bbadf176a1457 (patch)
tree2924a585b94f410d108814523ec2f46377bc0790 /include/linux
parentbd64f049f52553234586f7e825a4ddcee0794c2f (diff)
[PATCH] stop using page->lru in compound pages
The compound page logic is using page->lru, and these get will scribbled on in various places so switch the Compound page logic over to using ->mapping and ->private.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mm.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index af18e1da3bd5..fa7beaefd038 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -242,24 +242,24 @@ extern void FASTCALL(__page_cache_release(struct page *));
static inline int page_count(struct page *p)
{
if (PageCompound(p))
- p = (struct page *)p->lru.next;
+ p = (struct page *)p->private;
return atomic_read(&(p)->count);
}
static inline void get_page(struct page *page)
{
if (PageCompound(page))
- page = (struct page *)page->lru.next;
+ page = (struct page *)page->private;
atomic_inc(&page->count);
}
static inline void put_page(struct page *page)
{
if (PageCompound(page)) {
- page = (struct page *)page->lru.next;
+ page = (struct page *)page->private;
if (put_page_testzero(page)) {
- if (page->lru.prev) { /* destructor? */
- (*(void (*)(struct page *))page->lru.prev)(page);
+ if (page[1].mapping) { /* destructor? */
+ (*(void (*)(struct page *))page[1].mapping)(page);
} else {
__page_cache_release(page);
}