• Andrew Morton's avatar
    [PATCH] memory leak in current BK · 2329a4f6
    Andrew Morton authored
    Well I didn't test that very well.  __page_cache_release() is doing a
    __free_page() on a zero-ref page, so __free_pages() sends the refcount
    negative and doesn't free it.  With patch #8, page_cache_release()
    almost never frees pages, but it must have been leaking a little bit.
    Lucky it showed up.
    
    This fixes it, and also adds a missing PageReserved test in put_page().
    Which makes put_page() identical to page_cache_release(), but there are
    header file woes.  I'll fix that up later.
    2329a4f6
swap.c 5.62 KB