Skip to content
  • Josef Bacik's avatar
    Btrfs: fix deadlock with freeze and sync V2 · bd7de2c9
    Josef Bacik authored
    
    
    We can deadlock with freeze right now because we unconditionally start a
    transaction in our ->sync_fs() call.  To fix this just check and see if we
    have a running transaction to commit.  This saves us from the deadlock
    because at this point we'll have the umount sem for the sb so we're safe
    from freezes coming in after we've done our check.  With this patch the
    freeze xfstests no longer deadlocks.  Thanks,
    
    Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
    Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
    bd7de2c9