aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorZhao Lei <zhaolei@cn.fujitsu.com>2010-03-25 08:34:49 -0400
committerChris Mason <chris.mason@oracle.com>2010-03-30 21:19:09 -0400
commitab59381ea43f81c977cbd09add26950aaf6cb9fe (patch)
tree5c009854f6c04996492b3bcadc538ed9264948b9 /fs/btrfs
parent471fa17dff556ad38caf26de097c0630530d8cbe (diff)
Btrfs: Add error handle for btrfs_search_slot() in btrfs_read_chunk_tree()
We need to check return value of btrfs_search_slot() in btrfs_read_chunk_tree() and do corresponding error handing. Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/volumes.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 9df8e3f1ccab..c6c80093eac0 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -3389,6 +3389,8 @@ int btrfs_read_chunk_tree(struct btrfs_root *root)
3389 key.type = 0; 3389 key.type = 0;
3390again: 3390again:
3391 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); 3391 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
3392 if (ret < 0)
3393 goto error;
3392 while (1) { 3394 while (1) {
3393 leaf = path->nodes[0]; 3395 leaf = path->nodes[0];
3394 slot = path->slots[0]; 3396 slot = path->slots[0];