From a1872cf30655499b181a701215781586a7e40608 Mon Sep 17 00:00:00 2001 From: Jiang Liu Date: Fri, 14 Apr 2023 17:46:44 +0800 Subject: [PATCH] rafs: fix a regression caused by commit 2616fb2c0502e4 Fix a regression caused by commit 2616fb2c0502e4. Signed-off-by: Jiang Liu --- rafs/src/metadata/direct_v6.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rafs/src/metadata/direct_v6.rs b/rafs/src/metadata/direct_v6.rs index c940cc0e640..20e78d61c7e 100644 --- a/rafs/src/metadata/direct_v6.rs +++ b/rafs/src/metadata/direct_v6.rs @@ -535,7 +535,7 @@ impl OndiskInodeWrapper { let len = if div_round_up(self.size(), EROFS_BLOCK_SIZE) as usize == block_index + 1 { if self.size() % EROFS_BLOCK_SIZE == 0 { - EROFS_BLOCK_SIZE as usize + (EROFS_BLOCK_SIZE - s) as usize } else { (self.size() % EROFS_BLOCK_SIZE - s) as usize }