lkml.org 
[lkml]   [2002]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] free_swap_and_cache misses
free_swap_and_cache() often misses its purpose and leaves freeable page
in swap and cache. Wrong in mainline 2.4 and 2.5, but looks okay in -aa
(so don't bother to apply this if you're now merging that).

Hugh

--- 2.4.18-pre4/mm/swapfile.c Sun Dec 23 10:47:32 2001
+++ linux/mm/swapfile.c Sun Jan 20 23:30:52 2002
@@ -344,7 +344,7 @@
if (page) {
page_cache_get(page);
/* Only cache user (+us), or swap space full? Free it! */
- if (page_count(page) == 2 || vm_swap_full()) {
+ if (page_count(page) - !!page->buffers == 2 || vm_swap_full()) {
delete_from_swap_cache(page);
SetPageDirty(page);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:15    [W:0.052 / U:1.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site