Commit 19f24758 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Don't use peek_filter() unnecessarily

Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 286d8ad0
...@@ -1335,8 +1335,7 @@ int bch2_mark_update(struct btree_trans *trans, ...@@ -1335,8 +1335,7 @@ int bch2_mark_update(struct btree_trans *trans,
!bkey_deleted(&insert->k)) !bkey_deleted(&insert->k))
return 0; return 0;
while ((_k = bch2_btree_node_iter_peek_filter(&node_iter, b, while ((_k = bch2_btree_node_iter_peek(&node_iter, b))) {
KEY_TYPE_discard))) {
struct bkey unpacked; struct bkey unpacked;
struct bkey_s_c k = bkey_disassemble(b, _k, &unpacked); struct bkey_s_c k = bkey_disassemble(b, _k, &unpacked);
...@@ -1382,8 +1381,7 @@ void bch2_trans_fs_usage_apply(struct btree_trans *trans, ...@@ -1382,8 +1381,7 @@ void bch2_trans_fs_usage_apply(struct btree_trans *trans,
pr_err("overlapping with"); pr_err("overlapping with");
node_iter = iter->l[0].iter; node_iter = iter->l[0].iter;
while ((_k = bch2_btree_node_iter_peek_filter(&node_iter, b, while ((_k = bch2_btree_node_iter_peek(&node_iter, b))) {
KEY_TYPE_discard))) {
struct bkey unpacked; struct bkey unpacked;
struct bkey_s_c k; struct bkey_s_c k;
...@@ -1795,8 +1793,7 @@ int bch2_trans_mark_update(struct btree_trans *trans, ...@@ -1795,8 +1793,7 @@ int bch2_trans_mark_update(struct btree_trans *trans,
if (unlikely(flags & BTREE_TRIGGER_NOOVERWRITES)) if (unlikely(flags & BTREE_TRIGGER_NOOVERWRITES))
return 0; return 0;
while ((_k = bch2_btree_node_iter_peek_filter(&node_iter, b, while ((_k = bch2_btree_node_iter_peek(&node_iter, b))) {
KEY_TYPE_discard))) {
struct bkey unpacked; struct bkey unpacked;
struct bkey_s_c k; struct bkey_s_c k;
unsigned offset = 0; unsigned offset = 0;
......
...@@ -120,8 +120,7 @@ int bch2_extent_atomic_end(struct btree_iter *iter, ...@@ -120,8 +120,7 @@ int bch2_extent_atomic_end(struct btree_iter *iter,
if (ret < 0) if (ret < 0)
return ret; return ret;
while ((_k = bch2_btree_node_iter_peek_filter(&node_iter, b, while ((_k = bch2_btree_node_iter_peek(&node_iter, b))) {
KEY_TYPE_discard))) {
struct bkey unpacked; struct bkey unpacked;
struct bkey_s_c k = bkey_disassemble(b, _k, &unpacked); struct bkey_s_c k = bkey_disassemble(b, _k, &unpacked);
unsigned offset = 0; unsigned offset = 0;
...@@ -182,8 +181,7 @@ bch2_extent_can_insert(struct btree_trans *trans, ...@@ -182,8 +181,7 @@ bch2_extent_can_insert(struct btree_trans *trans,
struct bkey unpacked; struct bkey unpacked;
int sectors; int sectors;
_k = bch2_btree_node_iter_peek_filter(&node_iter, l->b, _k = bch2_btree_node_iter_peek(&node_iter, l->b);
KEY_TYPE_discard);
if (!_k) if (!_k)
return BTREE_INSERT_OK; return BTREE_INSERT_OK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment