[PATCH 4.19 022/219] Btrfs: fix removal logic of the tree mod log that leads to use-after-free issues