Write-ahead logging is exactly how ext3, ext4, and NTFS survive power failures without running a multi-hour fsck, replaying only committed transactions and rolling back the rest. Get the commit-flag check backwards and you either lose a completed write or, worse, replay a half-written transaction and corrupt the filesystem it was supposed to protect.