btrfs-progs: read_tree_block() and read_node_slot() cleanup.
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Wed, 28 Jan 2015 02:12:55 +0000 (10:12 +0800)
committerDavid Sterba <dsterba@suse.cz>
Mon, 2 Feb 2015 18:21:24 +0000 (19:21 +0100)
commitccdd0a067f36b689a0928074d53e5020f3ff5f5d
treef06f2dcf7788ab6a3b1e698c1c1b13e15d0b75b3
parent3e7524911214c4399f25ed2dabc0ad2956f7e90e
btrfs-progs: read_tree_block() and read_node_slot() cleanup.

Allow read_tree_block() and read_node_slot() to return error pointer.
This should help caller to get more specified error number.

For existing callers, change (!eb) judgmentt to
(!extent_buffer_uptodate(eb)) to keep the compatibility, and for caller
missing the check, use PTR_ERR(eb) if possible.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
13 files changed:
backref.c
btrfs-calc-size.c
btrfs-corrupt-block.c
btrfs-debug-tree.c
btrfs-image.c
cmds-check.c
cmds-restore.c
ctree.c
disk-io.c
extent-tree.c
extent_io.c
print-tree.c
qgroup-verify.c