Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f775738f authored by Wang Sheng-Hui's avatar Wang Sheng-Hui Committed by Josef Bacik
Browse files

btrfs/ctree.c: remove the unnecessary 'return -1;' at the end of bin_search



The code path should not reach there. Remove it.

Signed-off-by: default avatarWang Sheng-Hui <shhuiw@gmail.com>
parent d48b97b4
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -854,21 +854,19 @@ 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,
		     int level, int *slot)