From: Filipe David Borba Manana Date: Tue, 30 Jul 2013 23:39:56 +0000 (+0100) Subject: Btrfs: add missing error handling to read_tree_block X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0f0fe8f710f29dbd4b2c915fc1c36962e4957b3b;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git Btrfs: add missing error handling to read_tree_block Signed-off-by: Filipe David Borba Manana Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 13564354c927..2a378abb03fb 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1149,6 +1149,10 @@ struct extent_buffer *read_tree_block(struct btrfs_root *root, u64 bytenr, return NULL; ret = btree_read_extent_buffer_pages(root, buf, 0, parent_transid); + if (ret) { + free_extent_buffer(buf); + return NULL; + } return buf; }