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:0.021 / U:60.476 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site