]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: set trans to null in reserve_metadata_bytes if we commit the transaction
authorJosef Bacik <josef@redhat.com>
Tue, 26 Oct 2010 16:52:53 +0000 (12:52 -0400)
committerJosef Bacik <josef@redhat.com>
Tue, 26 Oct 2010 16:52:53 +0000 (12:52 -0400)
commitf06ff4502672ed49d634ca79c75e64f97180a287
tree91b1acbc1f60430742ace0b9155c4a014b7dbbaf
parent2fcd3902aa858e108863e4b315b5b7a2cd407500
Btrfs: set trans to null in reserve_metadata_bytes if we commit the transaction

btrfs_commit_transaction will free our trans, but because we pass trans to
shrink_delalloc we could possibly have a use after free situation.  So instead
if we commit the transaction, set trans to null and set committed to true so we
don't keep trying to commit a transaction.  This fixes a panic I could reproduce
at will.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
fs/btrfs/extent-tree.c