erofs-utils: lib: fix insufficient fragment cache bitmap
PATCH 1/1 erofs-utils: lib: fix insufficient fragment cache bitmap
.. should round up to the nearest byte instead of down.
Fixes f511cfbbc0da ("erofs-utils: introduce fragment cache")
Signed-off-by Gao Xiang <[email protected]>
--- lib/fragments.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/fragments.c +1 -1
@@ -402,7 +402,7 @@ int erofs_packedfile_init(struct erofs_sb_info *sbi, bool fragments_mkfs) err = -errno; goto err_out; } - epi->uptodate_size =BLK_ROUND_UP (sbi, ei.i_size) /8 ; + epi->uptodate_size =DIV_ROUND_UP (BLK_ROUND_UP (sbi, ei.i_size),8 ); epi->uptodate =calloc (1 , epi->uptodate_size);if (!epi->uptodate) { err = -ENOMEM ;
Signature · 1 line
2.43.5