Skip to content

Commit a74b35e

Browse files
lorddoskiaskdave
authored andcommitted
btrfs: Rename bin_search -> btrfs_bin_search
Currently there are 2 function doing binary search on btrfs nodes: bin_search and btrfs_bin_search. The latter being a simple wrapper for the former. So eliminate the wrapper and just rename bin_search to btrfs_bin_search. No functional changes Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 0a9b0e5 commit a74b35e

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

fs/btrfs/ctree.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1807,8 +1807,8 @@ static noinline int generic_bin_search(struct extent_buffer *eb,
18071807
* simple bin_search frontend that does the right thing for
18081808
* leaves vs nodes
18091809
*/
1810-
static int bin_search(struct extent_buffer *eb, const struct btrfs_key *key,
1811-
int level, int *slot)
1810+
int btrfs_bin_search(struct extent_buffer *eb, const struct btrfs_key *key,
1811+
int level, int *slot)
18121812
{
18131813
if (level == 0)
18141814
return generic_bin_search(eb,
@@ -1824,12 +1824,6 @@ static int bin_search(struct extent_buffer *eb, const struct btrfs_key *key,
18241824
slot);
18251825
}
18261826

1827-
int btrfs_bin_search(struct extent_buffer *eb, const struct btrfs_key *key,
1828-
int level, int *slot)
1829-
{
1830-
return bin_search(eb, key, level, slot);
1831-
}
1832-
18331827
static void root_add_used(struct btrfs_root *root, u32 size)
18341828
{
18351829
spin_lock(&root->accounting_lock);
@@ -2614,7 +2608,7 @@ static int key_search(struct extent_buffer *b, const struct btrfs_key *key,
26142608
int level, int *prev_cmp, int *slot)
26152609
{
26162610
if (*prev_cmp != 0) {
2617-
*prev_cmp = bin_search(b, key, level, slot);
2611+
*prev_cmp = btrfs_bin_search(b, key, level, slot);
26182612
return *prev_cmp;
26192613
}
26202614

@@ -5181,7 +5175,7 @@ int btrfs_search_forward(struct btrfs_root *root, struct btrfs_key *min_key,
51815175
while (1) {
51825176
nritems = btrfs_header_nritems(cur);
51835177
level = btrfs_header_level(cur);
5184-
sret = bin_search(cur, min_key, level, &slot);
5178+
sret = btrfs_bin_search(cur, min_key, level, &slot);
51855179

51865180
/* at the lowest level, we're done, setup the path and exit */
51875181
if (level == path->lowest_level) {

0 commit comments

Comments
 (0)