[12/18] btrfs: Add error handle for btrfs_search_slot() in btrfs_read_chunk_tree()
diff mbox

Message ID 4BAB5869.6040903@cn.fujitsu.com
State New, archived
Headers show

Commit Message

Miao Xie March 25, 2010, 12:34 p.m. UTC
None

Patch
diff mbox

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 3ae1f42..546de6b 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -3389,6 +3389,8 @@  int btrfs_read_chunk_tree(struct btrfs_root *root)
 	key.type = 0;
 again:
 	ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
+	if (ret < 0)
+		goto error;
 	while (1) {
 		leaf = path->nodes[0];
 		slot = path->slots[0];