[PATCH 5.10 074/186] nilfs2: fix state management in error path of log writing function