On 2024/9/23 13:17, [email protected] wrote:
From: Danny Lin <[email protected]> Commit 2fdbd28 fixed uncompressed packed inodes by not always writing compressed data, but it broke compressed packed inodes because now uncompressed file data is always written after the compressed data. The new error handling always rewinds with lseek and falls through to write_uncompressed_file_from_fd, regardless of whether the compressed data was written successfully (ret = 0) or not (ret = -ENOSPC). This can result in corrupted files. Fix it by simplifying the error handling to better match the old code. Fixes: 2fdbd28 ("erofs-utils: lib: fix uncompressed packed inode") Co-authored-by: Gao Xiang <[email protected]> Signed-off-by: Danny Lin <[email protected]>
Reviewed-by: Gao Xiang <[email protected]> Thanks, Gao Xiang
