Skip to content

Commit

Permalink
btrfs/ctree.c: remove the unnecessary 'return -1;' at the end of bin_…
Browse files Browse the repository at this point in the history
…search

The code path should not reach there. Remove it.

Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
  • Loading branch information
Wang Sheng-Hui authored and Josef Bacik committed May 11, 2012
1 parent d48b97b commit f775738
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/btrfs/ctree.c
Original file line number Diff line number Diff line change
Expand Up @@ -854,20 +854,18 @@ static noinline int generic_bin_search(struct extent_buffer *eb,
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;
}

int btrfs_bin_search(struct extent_buffer *eb, struct btrfs_key *key,
Expand Down

0 comments on commit f775738

Please sign in to comment.