]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: if we aren't committing just end the transaction if we error out
authorJosef Bacik <jbacik@fusionio.com>
Wed, 6 Feb 2013 21:55:41 +0000 (16:55 -0500)
committerJosef Bacik <jbacik@fusionio.com>
Wed, 20 Feb 2013 17:59:35 +0000 (12:59 -0500)
commitc702a1a0e8ae30898db5b3f7e0e120e0bc7af85a
tree204d6af57fbf70525359f5a2aa717a4785b89cd5
parent6c469facdfd9a12731fbd469e04186970cc57107
Btrfs: if we aren't committing just end the transaction if we error out

I hit a deadlock where transaction commit was waiting on num_writers to be
0.  This happened because somebody came into btrfs_commit_transaction and
noticed we had aborted and it went to cleanup_transaction.  This shouldn't
happen because cleanup_transaction is really to fixup a bad commit, it
doesn't do the normal trans handle cleanup things.  So if we have an error
just do the normal btrfs_end_transaction dance and return.  Once we are in
the actual commit path we can use cleanup_transaction and be good to go.
Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/transaction.c