From 6262e12206cbfc58fdfb31af19fcece4b00d0f1b Mon Sep 17 00:00:00 2001 From: Wang Shilong Date: Mon, 24 Feb 2014 19:55:14 +0800 Subject: [PATCH] Btrfs-progs: fsck: fix wrong return value in check_block() We found btrfsck will output backrefs mismatch while the filesystem is defenitely ok. The problem is that check_block() don't return right value,which makes btrfsck won't walk all tree blocks thus we don't get a consistent filesystem, we will fail to check extent refs etc. Reported-by: Gui Hecheng Signed-off-by: Wang Shilong Signed-off-by: David Sterba Signed-off-by: Chris Mason --- cmds-check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds-check.c b/cmds-check.c index 96c003b4..4cdeac8b 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -2477,7 +2477,7 @@ static int check_block(struct btrfs_trans_handle *trans, struct cache_extent *cache; struct btrfs_key key; enum btrfs_tree_block_status status; - int ret = 1; + int ret = 0; int level; cache = lookup_cache_extent(extent_cache, buf->start, buf->len);