btrfs/ctree.c: remove the unnecessary 'return -1;' at the end of bin_search
authorWang Sheng-Hui <shhuiw@gmail.com>
Fri, 30 Mar 2012 07:14:27 +0000 (15:14 +0800)
committerJosef Bacik <josef@redhat.com>
Fri, 11 May 2012 14:56:37 +0000 (10:56 -0400)
The code path should not reach there. Remove it.

Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
fs/btrfs/ctree.c

index 4106264fbc655ac79b26efa1177384ea92b72988..26847999c64923ba346b7d55cd51570f32fb2d59 100644 (file)
@@ -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,