diff options
Diffstat (limited to 'lib/btree.c')
-rw-r--r-- | lib/btree.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/btree.c b/lib/btree.c index e5ec1e9c1aa5..f9a484676cb6 100644 --- a/lib/btree.c +++ b/lib/btree.c | |||
@@ -319,8 +319,8 @@ void *btree_get_prev(struct btree_head *head, struct btree_geo *geo, | |||
319 | 319 | ||
320 | if (head->height == 0) | 320 | if (head->height == 0) |
321 | return NULL; | 321 | return NULL; |
322 | retry: | ||
323 | longcpy(key, __key, geo->keylen); | 322 | longcpy(key, __key, geo->keylen); |
323 | retry: | ||
324 | dec_key(geo, key); | 324 | dec_key(geo, key); |
325 | 325 | ||
326 | node = head->node; | 326 | node = head->node; |
@@ -351,7 +351,7 @@ retry: | |||
351 | } | 351 | } |
352 | miss: | 352 | miss: |
353 | if (retry_key) { | 353 | if (retry_key) { |
354 | __key = retry_key; | 354 | longcpy(key, retry_key, geo->keylen); |
355 | retry_key = NULL; | 355 | retry_key = NULL; |
356 | goto retry; | 356 | goto retry; |
357 | } | 357 | } |
@@ -509,6 +509,7 @@ retry: | |||
509 | int btree_insert(struct btree_head *head, struct btree_geo *geo, | 509 | int btree_insert(struct btree_head *head, struct btree_geo *geo, |
510 | unsigned long *key, void *val, gfp_t gfp) | 510 | unsigned long *key, void *val, gfp_t gfp) |
511 | { | 511 | { |
512 | BUG_ON(!val); | ||
512 | return btree_insert_level(head, geo, key, val, 1, gfp); | 513 | return btree_insert_level(head, geo, key, val, 1, gfp); |
513 | } | 514 | } |
514 | EXPORT_SYMBOL_GPL(btree_insert); | 515 | EXPORT_SYMBOL_GPL(btree_insert); |