aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.c
diff options
context:
space:
mode:
authorWang Sheng-Hui <shhuiw@gmail.com>2012-03-30 03:14:27 -0400
committerJosef Bacik <josef@redhat.com>2012-05-11 10:56:37 -0400
commitf775738f6fba9c7f6deaa540860d6fb7e2d28445 (patch)
treead2276d30997368ea4f5fc90daee9d8c71ad03ba /fs/btrfs/ctree.c
parentd48b97b403d23f6df0b990cee652bdf9a52337a3 (diff)
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: Wang Sheng-Hui <shhuiw@gmail.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r--fs/btrfs/ctree.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 4106264fbc65..26847999c649 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -854,20 +854,18 @@ static noinline int generic_bin_search(struct extent_buffer *eb,
854static int bin_search(struct extent_buffer *eb, struct btrfs_key *key, 854static int bin_search(struct extent_buffer *eb, struct btrfs_key *key,
855 int level, int *slot) 855 int level, int *slot)
856{ 856{
857 if (level == 0) { 857 if (level == 0)
858 return generic_bin_search(eb, 858 return generic_bin_search(eb,
859 offsetof(struct btrfs_leaf, items), 859 offsetof(struct btrfs_leaf, items),
860 sizeof(struct btrfs_item), 860 sizeof(struct btrfs_item),
861 key, btrfs_header_nritems(eb), 861 key, btrfs_header_nritems(eb),
862 slot); 862 slot);
863 } else { 863 else
864 return generic_bin_search(eb, 864 return generic_bin_search(eb,
865 offsetof(struct btrfs_node, ptrs), 865 offsetof(struct btrfs_node, ptrs),
866 sizeof(struct btrfs_key_ptr), 866 sizeof(struct btrfs_key_ptr),
867 key, btrfs_header_nritems(eb), 867 key, btrfs_header_nritems(eb),
868 slot); 868 slot);
869 }
870 return -1;
871} 869}
872 870
873int btrfs_bin_search(struct extent_buffer *eb, struct btrfs_key *key, 871int btrfs_bin_search(struct extent_buffer *eb, struct btrfs_key *key,