[PATCH] reiser4progs: Grab pset after skipping the semantic pass by fsck

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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)))

[Index of Archives]     [Linux File System Development]     [Linux BTRFS]     [Linux NFS]     [Linux Filesystems]     [Ext4 Filesystem]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Resources]

  Powered by Linux