kernel/block_cache: Adjust logic in cache_detach_sub_transaction.

This way it should be more clear that parent_data is being modified
in tandem with original_data.

No functional change intended.
This commit is contained in:
Augustin Cavalier 2022-02-08 18:35:03 -05:00
parent e12a5fe215
commit 8a2d11b7dc

View File

@ -3055,15 +3055,15 @@ cache_detach_sub_transaction(void* _cache, int32 id,
if (block->parent_data != block->current_data) {
// The block had been changed in both transactions
block->original_data = block->parent_data;
block->parent_data = NULL;
} else {
// The block has only been changed in the parent
block->original_data = NULL;
block->original_data = block->parent_data = NULL;
}
// move the block to the previous transaction list
transaction->blocks.Add(block);
block->previous_transaction = transaction;
block->parent_data = NULL;
}
if (block->original_data != NULL) {