At line 285, ftruncate() failure was logged using 'r' which is 0 from the preceding successful loop_write() call. log_error_errno(0, ...) triggers an assertion crash in developer builds (ASSERT_NON_ZERO) and silently returns success in release builds, swallowing the ftruncate error. Replace with errno which is set by ftruncate() on failure. Signed-off-by: dongshengyuan <dongshengyuan@uniontech.com> Co-developed-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>