[PATCH] Fix IO error reporting on fsync()