Btrfs: fix use-after-free in __btrfs_end_transaction