[PATCH openEuler-1.0-LTS] nilfs2: fix state management in error path of log writing function