• Andrew Morton's avatar
    [PATCH] fix dirty page management · 0f9268b8
    Andrew Morton authored
    This fixes a bug in ext3 - when ext3 decides that it wants to fail its
    writepage(), it is running SetPageDirty().  But ->writepage has just put
    the page on ->clean_pages().  The page ends up dirty, on ->clean_pages
    and the normal writeback paths don't know about it any more.
    
    So run set_page_dirty() instead, to place the page back on the dirty
    list.
    
    And in move_from_swap_cache(), shuffle the page across to ->dirty_pages
    so that it's eligible for writeout.  ___add_to_page_cache() forgets to
    look at the page state when deciding which list to attach it to.
    
    All SetPageDirty() callers otherwise look OK.
    0f9268b8
swap_state.c 8.18 KB