[PATCH 6.6 059/269] nilfs2: fix state management in error path of log writing function