• Miao Xie's avatar
    Btrfs: fix missed transaction->aborted check · 2cba30f1
    Miao Xie authored
    First, though the current transaction->aborted check can stop the commit early
    and avoid unnecessary operations, it is too early, and some transaction handles
    don't end, those handles may set transaction->aborted after the check.
    
    Second, when we commit the transaction, we will wake up some worker threads to
    flush the space cache and inode cache. Those threads also allocate some transaction
    handles and may set transaction->aborted if some serious error happens.
    
    So we need more check for ->aborted when committing the transaction. Fix it.
    Signed-off-by: default avatarMiao Xie <miaox@cn.fujitsu.com>
    Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
    2cba30f1
transaction.c 47.6 KB