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