• Andrew Morton's avatar
    [PATCH] ext3: fix page lock vs journal_start ranking bug · 30276fd6
    Andrew Morton authored
    ext3_block_truncate_page() is calling grab_cache_page() inside a JBD
    transaction.  This is wrong, because transactions nest inside lock_page().
    
    The deadlock is against shrink_list->ext3_journalled_writepage->journal_start.
    
    This was not noticed before because we never used to journal writepage() data
    in journalled-data mode.  And because the deadlock against
    generic_file_write() is covered up by i_sem.
    
    Rework things so that we lock the page prior to starting a transaction.
    30276fd6
inode.c 85.8 KB