After failure of try_repair_inode(), the value @ret will be reseted
anyway. Then counter @error won't be incremented.

So do not reset @ret after try_repair_inode().

Signed-off-by: Su Yue <[email protected]>
---
 cmds-check.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/cmds-check.c b/cmds-check.c
index 5c15dfb60b9a..68348ae94c8b 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -3968,7 +3968,6 @@ static int check_inode_recs(struct btrfs_root *root,
                                free_inode_rec(rec);
                                continue;
                        }
-                       ret = 0;
                }
 
                if (!(repair && ret == 0))
-- 
2.15.0



--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to