nilfs2: fix state management in error path of log writing function (CVE-2024-47669) | HOL Guard CVE