[PATCH 4.19 25/96] nilfs2: fix state management in error path of log writing function