diff options
author | Filipe David Borba Manana <fdmanana@gmail.com> | 2013-07-31 00:39:56 +0100 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-09-01 08:04:46 -0400 |
commit | 0f0fe8f710f29dbd4b2c915fc1c36962e4957b3b (patch) | |
tree | 6b296ac2cfa48d9cf2ae3191e804b4937f2dba6c /fs/btrfs/disk-io.c | |
parent | eb2067f713ff1c6d867020e85f95fba7d000ed1a (diff) | |
download | op-kernel-dev-0f0fe8f710f29dbd4b2c915fc1c36962e4957b3b.zip op-kernel-dev-0f0fe8f710f29dbd4b2c915fc1c36962e4957b3b.tar.gz |
Btrfs: add missing error handling to read_tree_block
Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 1356435..2a378ab 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; } |