diff --git a/genext2fs.c b/genext2fs.c index 7d6b857..7da8262 100644 --- a/genext2fs.c +++ b/genext2fs.c @@ -2568,7 +2568,7 @@ add2fs_from_tarball(filesystem *fs, uint32 this_nod, FILE * fh, int squash_uids, stats->ninodes++; break; case S_IFREG: - stats->nblocks += (filesize + BLOCKSIZE - 1) / BLOCKSIZE; + stats->nblocks += ifreg_blocks(filesize, BLOCKSIZE >> 11); case S_IFCHR: case S_IFBLK: case S_IFIFO: