diff options
| author | Greg Kroah-Hartman <greg@kroah.com> | 2003-02-26 21:49:57 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2003-02-26 21:49:57 -0800 |
| commit | fffd915522cb703e95381fc52c0ac3843f013f18 (patch) | |
| tree | 7efd17b1bd1a584a7fa10633d26b4b5e99283deb /include/linux/mm.h | |
| parent | a6cc5237a1f189c30cd06d05e2955e5bc63d8913 (diff) | |
| parent | be8013e867207d570f33cc1c66bd06797f1eed6b (diff) | |
Merge kroah.com:/home/greg/linux/BK/bleed-2.5
into kroah.com:/home/greg/linux/BK/pci-2.5
Diffstat (limited to 'include/linux/mm.h')
| -rw-r--r-- | include/linux/mm.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index c68771c27d88..5cef04a2623e 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -232,11 +232,15 @@ static inline void get_page(struct page *page) static inline void put_page(struct page *page) { if (PageCompound(page)) { - page = (struct page *)page->lru.next; - if (page->lru.prev) { /* destructor? */ - (*(void (*)(struct page *))page->lru.prev)(page); - return; + if (put_page_testzero(page)) { + page = (struct page *)page->lru.next; + if (page->lru.prev) { /* destructor? */ + (*(void (*)(struct page *))page->lru.prev)(page); + } else { + __page_cache_release(page); + } } + return; } if (!PageReserved(page) && put_page_testzero(page)) __page_cache_release(page); |
