* simple bin_search frontend that does the right thing for
  * leaves vs nodes
  */
-static int bin_search(struct extent_buffer *eb, const struct btrfs_key *key,
-                     int level, int *slot)
+int btrfs_bin_search(struct extent_buffer *eb, const struct btrfs_key *key,
+                    int level, int *slot)
 {
        if (level == 0)
                return generic_bin_search(eb,
                                          slot);
 }
 
-int btrfs_bin_search(struct extent_buffer *eb, const struct btrfs_key *key,
-                    int level, int *slot)
-{
-       return bin_search(eb, key, level, slot);
-}
-
 static void root_add_used(struct btrfs_root *root, u32 size)
 {
        spin_lock(&root->accounting_lock);
                      int level, int *prev_cmp, int *slot)
 {
        if (*prev_cmp != 0) {
-               *prev_cmp = bin_search(b, key, level, slot);
+               *prev_cmp = btrfs_bin_search(b, key, level, slot);
                return *prev_cmp;
        }
 
        while (1) {
                nritems = btrfs_header_nritems(cur);
                level = btrfs_header_level(cur);
-               sret = bin_search(cur, min_key, level, &slot);
+               sret = btrfs_bin_search(cur, min_key, level, &slot);
 
                /* at the lowest level, we're done, setup the path and exit */
                if (level == path->lowest_level) {