summaryrefslogtreecommitdiff
path: root/fs/bcachefs/str_hash.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-09-25 22:57:56 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:08:28 +0300
commitef9f95ba41b7685fc27ca73753bbfa4467555b79 (patch)
tree2c09757e72a63a35c2ff9fc6ff05a53186c14aec /fs/bcachefs/str_hash.h
parentb43a0f60a61e8e0adea6b1b9adc9a97600fc2f00 (diff)
downloadlinux-ef9f95ba41b7685fc27ca73753bbfa4467555b79.tar.xz
bcachefs: Improve error handling for for_each_btree_key_continue()
Change it to match for_each_btree_key() Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/str_hash.h')
-rw-r--r--fs/bcachefs/str_hash.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/bcachefs/str_hash.h b/fs/bcachefs/str_hash.h
index df3f19055d1e..31b278e71051 100644
--- a/fs/bcachefs/str_hash.h
+++ b/fs/bcachefs/str_hash.h
@@ -187,6 +187,7 @@ int bch2_hash_needs_whiteout(struct btree_trans *trans,
{
struct btree_iter *iter;
struct bkey_s_c k;
+ int ret;
iter = bch2_trans_copy_iter(trans, start);
if (IS_ERR(iter))
@@ -194,7 +195,7 @@ int bch2_hash_needs_whiteout(struct btree_trans *trans,
bch2_btree_iter_next_slot(iter);
- for_each_btree_key_continue(iter, BTREE_ITER_SLOTS, k) {
+ for_each_btree_key_continue(iter, BTREE_ITER_SLOTS, k, ret) {
if (k.k->type != desc.key_type &&
k.k->type != KEY_TYPE_whiteout)
break;
@@ -206,7 +207,8 @@ int bch2_hash_needs_whiteout(struct btree_trans *trans,
}
}
- return bch2_trans_iter_free(trans, iter);
+ bch2_trans_iter_free(trans, iter);
+ return ret;
}
static __always_inline