btrfs-progs: check/original: Don't overwrite return value when we failed to repair

In check_inode_recs(), for repair mode we always reset @ret to 0.  It
makes no sense and later we check @ret to determine if the repair is
successful.

Fix it by removing the offending overwrite.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Gu Jinxiang <gujx@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Qu Wenruo 2018-07-05 15:37:31 +08:00 committed by David Sterba
parent 159f177cf9
commit 21d1109168
1 changed files with 0 additions and 1 deletions

View File

@ -2780,7 +2780,6 @@ static int check_inode_recs(struct btrfs_root *root,
free_inode_rec(rec);
continue;
}
ret = 0;
}
if (!(repair && ret == 0))