lkml.org 
[lkml]   [2001]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: pre12 VM doubts and patch
On Wed, 19 Sep 2001, Hugh Dickins wrote:
>
> thank you. A few doubts: in the first case I've appended a patch; for
> the rest you may prefer to make your own patch, or ask me for patch,
> or reject my doubts.

Please add another:

6. Why has swap_writepage lost its check for stale entries? If your
other changes have somehow made that too rare a case to bother
about, please remove the comment above swap_writepage instead.

Hugh

--- 2.4.10-pre12/mm/swap_state.c Wed Sep 19 14:05:54 2001
+++ linux/mm/swap_state.c Mon Sep 17 06:30:26 2001
@@ -23,6 +23,17 @@
*/
static int swap_writepage(struct page *page)
{
+ /* One for the page cache, one for this user, one for page->buffers */
+ if (page_count(page) > 2 + !!page->buffers)
+ goto in_use;
+ if (swap_count(page) > 1)
+ goto in_use;
+
+ delete_from_swap_cache_nolock(page);
+ UnlockPage(page);
+ return 0;
+
+in_use:
rw_swap_page(WRITE, page);
return 0;
}
-
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:03    [W:0.103 / U:1.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site