• Andrew Morton's avatar
    [PATCH] truncate fixes · 911ceab5
    Andrew Morton authored
    The new truncate code needs to check page->mapping after acquiring the
    page lock.  Because the page could have been unmapped by page reclaim
    or by invalidate_inode_pages() while we waited for the page lock.
    
    Also, the page may have been moved between a tmpfs inode and
    swapper_space.  Because we don't hold the mapping->page_lock across the
    entire truncate operation any more.
    
    Also, change the initial truncate scan (the non-blocking one which is
    there to stop as much writeout as possible) so that it is immune to
    other CPUs decreasing page->index.
    
    Also fix negated test in invalidate_inode_pages2().  Not sure how that
    got in there.
    911ceab5
truncate.c 6.08 KB