diff mbox

[2/3] btrfs-progs: check: do not reset ret after try_repair_inode

Message ID 20171121101524.2014-2-suy.fnst@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

Su Yue Nov. 21, 2017, 10:15 a.m. UTC
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 <suy.fnst@cn.fujitsu.com>
---
 cmds-check.c | 1 -
 1 file changed, 1 deletion(-)

Comments

David Sterba Jan. 8, 2018, 7 p.m. UTC | #1
On Tue, Nov 21, 2017 at 06:15:23PM +0800, Su Yue wrote:
> After failure of try_repair_inode(), the value @ret will be reseted
> anyway. Then counter @error won't be incremented.

Can you pleae expand the changelog? I don't see how this patch helps,
the extra line does not hurt readability so I don't see a strong reason
to remove it.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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