[PATCH] Btrfs-progs: fix wrong return value of check_owner_ref()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If we find the block by seach corresponding fs tree, we should return 0,
and tell the caller we pass the check. Or btrfsck will fail to read the
fs/file tree and report many error message by mistake.

Signed-off-by: Miao Xie <miaox@xxxxxxxxxxxxxx>
---
Several days ago, I sent this patch as a reply. Now I send it as a independent
patch mail.
---
 btrfsck.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/btrfsck.c b/btrfsck.c
index 4e91769..57e7b57 100644
--- a/btrfsck.c
+++ b/btrfsck.c
@@ -1954,7 +1954,7 @@ static int check_owner_ref(struct btrfs_root *root,
 
 	if (buf->start == btrfs_node_blockptr(path.nodes[level + 1],
 					      path.slots[level + 1]))
-		rec->owner_ref_checked = 1;
+		found = 1;
 
 	btrfs_release_path(ref_root, &path);
 	return found ? 0 : 1;
-- 
1.7.6.5
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux