[PATCH 5.15 089/214] nilfs2: fix state management in error path of log writing function