Return value of repair_root_items():
<0 on error
=0 does nothing
>0 if repair is enabled, N roots are repaired;
else N roots are corrupted.
In the repair mode, there should be no error if the return value is
bigger than 0. This fixes the test fsck/006 again.
Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
if (!init_extent_tree) {
ret = repair_root_items(info);
if (!init_extent_tree) {
ret = repair_root_items(info);
error("failed to repair root items: %s", strerror(-ret));
goto close_out;
}
error("failed to repair root items: %s", strerror(-ret));
goto close_out;
}