[PATCH v2] erofs-utils: add missing block counting

Noboru Asai asai at sijam.com
Wed Apr 24 15:59:23 AEST 2024


Add missing block counting when the data to be inlined is not inlined.

---
v2:
- move from erofs_write_tail_end() to erofs_prepare_tail_block()

Signed-off-by: Noboru Asai <asai at sijam.com>
---
 lib/inode.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/inode.c b/lib/inode.c
index cf22bbe..9aba69d 100644
--- a/lib/inode.c
+++ b/lib/inode.c
@@ -670,6 +670,7 @@ static int erofs_prepare_tail_block(struct erofs_inode *inode)
 	} else {
 		inode->lazy_tailblock = true;
 	}
+	inode->u.i_blocks += 1;
 	return 0;
 }
 
-- 
2.44.0



More information about the Linux-erofs mailing list