reiser4progs: Grab pset after skipping the semantic pass by fsck
PATCH 1/1 reiser4progs: Grab pset after skipping the semantic pass by fsck
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 <[email protected]>
--- librepair/repair.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
librepair/repair.c +7 -1
@@ -786,8 +786,14 @@ errno_t repair_check(repair_data_t *repaif (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)))