Btrfs-progs: remove the unnecessary 'return -1;' at the end of bin_search

The code path should not reach there. Remove it.

[Eric Sandeen: port kernel commit 3fed40c to userspace]

Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
master
Eric Sandeen 2013-04-26 16:06:09 -05:00 committed by David Sterba
parent 2e89e55682
commit 296b051def
1 changed files with 2 additions and 4 deletions

View File

@ -585,20 +585,18 @@ static int generic_bin_search(struct extent_buffer *eb, unsigned long p,
static int bin_search(struct extent_buffer *eb, struct btrfs_key *key,
int level, int *slot)
{
if (level == 0) {
if (level == 0)
return generic_bin_search(eb,
offsetof(struct btrfs_leaf, items),
sizeof(struct btrfs_item),
key, btrfs_header_nritems(eb),
slot);
} else {
else
return generic_bin_search(eb,
offsetof(struct btrfs_node, ptrs),
sizeof(struct btrfs_key_ptr),
key, btrfs_header_nritems(eb),
slot);
}
return -1;
}
struct extent_buffer *read_node_slot(struct btrfs_root *root,