linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* shrink_mmap bug in 2.2?
@ 2000-06-15  0:50 Neil Schemenauer
  2000-06-15  1:16 ` Kanoj Sarcar
  0 siblings, 1 reply; 6+ messages in thread
From: Neil Schemenauer @ 2000-06-15  0:50 UTC (permalink / raw)
  To: linux-mm

This code looks strange to me (possibly because I don't
understand it):

    /*
     * Is it a page swap page? If so, we want to
     * drop it if it is no longer used, even if it
     * were to be marked referenced..
     */
    if (PageSwapCache(page)) {
            if (referenced && swap_count(page->offset) != 1)
                    continue;
            delete_from_swap_cache(page);
            return 1;
    }       

Can pages be deleted from the swap cache if swap_count is not
one?  If not, then I think this code is wrong.  It should be:

    if (PageSwapCache(page)) {
            if (swap_count(page->offset) != 1)
                    continue;
            delete_from_swap_cache(page);
            return 1;
    }       
 
Thanks in advance for any help.

    Neil

-- 
"God, root, what is difference?" - Pitr
"God is more forgiving." - Dave Aronson
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2000-06-16 10:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-15  0:50 shrink_mmap bug in 2.2? Neil Schemenauer
2000-06-15  1:16 ` Kanoj Sarcar
2000-06-15  8:58   ` volodya
2000-06-15 16:56     ` Kanoj Sarcar
2000-06-15 19:12   ` Neil Schemenauer
2000-06-16 10:05     ` Stephen C. Tweedie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox