From: Zhao Lei Date: Thu, 25 Mar 2010 12:34:49 +0000 (+0000) Subject: Btrfs: Add error handle for btrfs_search_slot() in btrfs_read_chunk_tree() X-Git-Tag: v2.6.34-rc4~3^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab59381ea43f81c977cbd09add26950aaf6cb9fe;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 Signed-off-by: Miao Xie Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 9df8e3f..c6c8009 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];