Init global pset in the case when semantic pass is skipped because of fatal corruptions. Otherwise fsck segfaults on volumes of format versions 4.0.1 when reopening a backup at fsck_check_fini(). Signed-off-by: Edward Shishkin <edward.shishkin@xxxxxxxxx> --- librepair/repair.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/librepair/repair.c +++ b/librepair/repair.c @@ -786,8 +786,14 @@ errno_t repair_check(repair_data_t *repa if (repair->fatal) { aal_warn("Fatal corruptions were found. " "Semantic pass is skipped."); + /* + * We need to prepare pset for backup + * creation in fsck_check_fini(). + */ + if (res = reiser4_pset_tree(control.repair->fs->tree, 0)) + goto error; goto update; - } + } /* Check the semantic reiser4 tree. */ if ((res = repair_sem_prepare(&control, &sem)))