* Bug in mm.h?
@ 2005-04-07 9:11 Leonid Podolny
0 siblings, 0 replies; only message in thread
From: Leonid Podolny @ 2005-04-07 9:11 UTC (permalink / raw)
To: lkml
I fail to understand whether the following is a bug. From what I see, if
the page is reserved, page->count is not decreased. The order of the
conditions should be reversed.
>From mm.h:
static inline void put_page(struct page *page)
{
if (!PageReserved(page) && put_page_testzero(page))
__page_cache_release(page);
}
static inline void get_page(struct page *page)
{
atomic_inc(&page->_count);
}
#define put_page_testzero(p) \
({ \
BUG_ON(page_count(p) == 0); \
atomic_add_negative(-1, &(p)->_count); \
})
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-04-07 9:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-07 9:11 Bug in mm.h? Leonid Podolny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox