Skip to content

Commit

Permalink
erofs-utils: fix -Ededupe crash without fragments enabled
Browse files Browse the repository at this point in the history
The root cause is the same as commit d9baceb ("erofs-utils:
fix -Ededupe crash without fragments enabled").

In fact, the fragment manager should be reworked in the next major
erofs-utils version to avoid those dirty hacks.

Fixes: fc880e3 ("erofs-utils: mkfs: minor cleanup & rearrangement")
Signed-off-by: Gao Xiang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
hsiangkao committed Jan 2, 2025
1 parent 04d6d5a commit f93c462
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mkfs/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,8 @@ int main(int argc, char **argv)
if (erofstar.index_mode && g_sbi.extra_devices && !erofstar.mapfile)
g_sbi.devs[0].blocks = BLK_ROUND_UP(&g_sbi, erofstar.offset);

if (erofs_sb_has_fragments(&g_sbi)) {
if ((cfg.c_fragments || cfg.c_extra_ea_name_prefixes) &&
erofs_sb_has_fragments(&g_sbi)) {
erofs_update_progressinfo("Handling packed data ...");
err = erofs_flush_packed_inode(&g_sbi);
if (err)
Expand Down

0 comments on commit f93c462

Please sign in to comment.