lkml.org 
[lkml]   [1999]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] readahead must be stopped when OOM
This is a part of my new oom-patch updated to 2.3.18ac6:

diff -urN 2.3.18ac6/mm/filemap.c 2.3.18ac6-oom/mm/filemap.c
--- 2.3.18ac6/mm/filemap.c Mon Sep 20 01:15:46 1999
+++ 2.3.18ac6-oom/mm/filemap.c Mon Sep 20 02:42:38 1999
@@ -923,7 +923,8 @@
ahead = 0;
while (ahead < max_ahead) {
ahead += PAGE_CACHE_SIZE;
- page_cache_read(filp, raend + ahead);
+ if (page_cache_read(filp, raend + ahead) < 0)
+ break;
}
/*
* If we tried to read ahead some pages,

The above was missing from the filemap.c oom fixes in 2.3.18ac6.

Andrea


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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