[lkml]   [1999]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    SubjectRe: [patch] fix for pagecache fs corruption (2.3.15-pre2) [Re: [patch] ramdisk blocksize]
    On Sun, 22 Aug 1999, Andrea Arcangeli wrote:

    >To make the ramdisk drive working properly and to fix the other page-cache
    >fs-corruption bugs you only need to apply the above patch against

    Chih-Chung Chang pointed me out that in 2.3.x it's been added a test in
    the CAN_UNUSE(inode) macro exactly to avoid freeing inodes with i_nrpages
    != 0. I didn't noticed such change, sorry (so no FS corruption could

    But IMO such check is a dirty hack that can lead to a DoS. It seems to me
    that it's possible to leak inodes by simply allocating lots of inodes with
    only one page queued in them. The inode memory is not freeable.

    Now that truncate_inode_pages()/flushpage are capable of dealing with
    dirty/protected data we don't need such hack anymore to avoid
    fs-corruption. This patch goes on the top of my two previous
    page-cache patches:

    --- 2.3.15-pre2-pagecache2/fs/inode.c Mon Aug 23 15:15:44 1999
    +++ 2.3.15-pre2-pagecache3/fs/inode.c Mon Aug 23 15:44:45 1999
    @@ -339,7 +339,7 @@
    * dispose_list.
    #define CAN_UNUSE(inode) \
    - (((inode)->i_count | (inode)->i_state | (inode)->i_nrpages) == 0)
    + (((inode)->i_count | (inode)->i_state) == 0)
    #define INODE(entry) (list_entry(entry, struct inode, i_list))

    static int free_inodes(void)
    A new global page-cache/ramdisk patch against clean 2.3.15-pre2 can be
    downloaded here:


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:53    [W:0.021 / U:4.560 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site