]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix up read_tree_block to return proper error
authorLiu Bo <bo.li.liu@oracle.com>
Mon, 25 May 2015 09:30:15 +0000 (17:30 +0800)
committerChris Mason <clm@fb.com>
Wed, 3 Jun 2015 11:03:08 +0000 (04:03 -0700)
commite2b84a5213941886539d24506622e4d466991500
treefcce36cbfdc022f24b5b847152d6b17c967a1b64
parent18edd36b0990f1caf99ed545971a73a80e126c8e
Btrfs: fix up read_tree_block to return proper error

The return value of read_tree_block() can confuse callers as it always
returns NULL for either -ENOMEM or -EIO, so it's likely that callers
parse it to a wrong error, for instance, in btrfs_read_tree_root().

This fixes the above issue.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/backref.c
fs/btrfs/ctree.c
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/relocation.c