Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128856
b: refs/heads/master
c: 9652480
h: refs/heads/master
v: v3
  • Loading branch information
Yan authored and Chris Mason committed Sep 25, 2008
1 parent 6226783 commit ba3a8a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 445dceb78f3445b9bcade90e93ca35cae6120172
refs/heads/master: 9652480bf48500885a30754b4a5c436b5b34456d
5 changes: 4 additions & 1 deletion trunk/fs/btrfs/ctree.c
Original file line number Diff line number Diff line change
Expand Up @@ -2992,6 +2992,7 @@ int btrfs_search_forward(struct btrfs_root *root, struct btrfs_key *min_key,
struct extent_buffer *cur;
struct btrfs_key found_key;
int slot;
int sret;
u32 nritems;
int level;
int ret = 1;
Expand All @@ -3009,7 +3010,7 @@ int btrfs_search_forward(struct btrfs_root *root, struct btrfs_key *min_key,
while(1) {
nritems = btrfs_header_nritems(cur);
level = btrfs_header_level(cur);
bin_search(cur, min_key, level, &slot);
sret = bin_search(cur, min_key, level, &slot);

/* at level = 0, we're done, setup the path and exit */
if (level == 0) {
Expand All @@ -3018,6 +3019,8 @@ int btrfs_search_forward(struct btrfs_root *root, struct btrfs_key *min_key,
btrfs_item_key_to_cpu(cur, &found_key, slot);
goto out;
}
if (sret && slot > 0)
slot--;
/*
* check this node pointer against the cache_only and
* min_trans parameters. If it isn't in cache or is too
Expand Down

0 comments on commit ba3a8a6

Please sign in to comment.