lkml.org 
[lkml]   [2004]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subjectinvalidate_inode_pages2
    Something broke in invalidate_inode_pages2 between 2.4 and 2.6, this
    causes malfunctions with mapped pages in 2.6.

    I guess the below untested one liner should be enough to fix it. The
    only single point of invalidate_inode_pages2, is to invalidate _mapped_
    pages too. Otherwise we could as well use invalidate_inode_pages.
    Clearly the dirty bit doesn't mean invalidate, invalidate primarly means
    clearing the uptodate bitflag.

    --- sles/mm/truncate.c.~1~ 2004-05-18 19:24:40.000000000 +0200
    +++ sles/mm/truncate.c 2004-05-19 02:09:28.311781864 +0200
    @@ -260,9 +260,10 @@ void invalidate_inode_pages2(struct addr
    if (page->mapping == mapping) { /* truncate race? */
    wait_on_page_writeback(page);
    next = page->index + 1;
    - if (page_mapped(page))
    + if (page_mapped(page)) {
    + ClearPageUptodate(page);
    clear_page_dirty(page);
    - else
    + } else
    invalidate_complete_page(mapping, page);
    }
    unlock_page(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 14:03    [W:0.022 / U:31.168 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site