mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
bcachefs: Don't use peek_filter() unnecessarily
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
286d8ad040
commit
19f24758ef
@ -1335,8 +1335,7 @@ int bch2_mark_update(struct btree_trans *trans,
|
||||
!bkey_deleted(&insert->k))
|
||||
return 0;
|
||||
|
||||
while ((_k = bch2_btree_node_iter_peek_filter(&node_iter, b,
|
||||
KEY_TYPE_discard))) {
|
||||
while ((_k = bch2_btree_node_iter_peek(&node_iter, b))) {
|
||||
struct bkey 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,
|
||||
pr_err("overlapping with");
|
||||
|
||||
node_iter = iter->l[0].iter;
|
||||
while ((_k = bch2_btree_node_iter_peek_filter(&node_iter, b,
|
||||
KEY_TYPE_discard))) {
|
||||
while ((_k = bch2_btree_node_iter_peek(&node_iter, b))) {
|
||||
struct bkey unpacked;
|
||||
struct bkey_s_c k;
|
||||
|
||||
@ -1795,8 +1793,7 @@ int bch2_trans_mark_update(struct btree_trans *trans,
|
||||
if (unlikely(flags & BTREE_TRIGGER_NOOVERWRITES))
|
||||
return 0;
|
||||
|
||||
while ((_k = bch2_btree_node_iter_peek_filter(&node_iter, b,
|
||||
KEY_TYPE_discard))) {
|
||||
while ((_k = bch2_btree_node_iter_peek(&node_iter, b))) {
|
||||
struct bkey unpacked;
|
||||
struct bkey_s_c k;
|
||||
unsigned offset = 0;
|
||||
|
@ -120,8 +120,7 @@ int bch2_extent_atomic_end(struct btree_iter *iter,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
while ((_k = bch2_btree_node_iter_peek_filter(&node_iter, b,
|
||||
KEY_TYPE_discard))) {
|
||||
while ((_k = bch2_btree_node_iter_peek(&node_iter, b))) {
|
||||
struct bkey unpacked;
|
||||
struct bkey_s_c k = bkey_disassemble(b, _k, &unpacked);
|
||||
unsigned offset = 0;
|
||||
@ -182,8 +181,7 @@ bch2_extent_can_insert(struct btree_trans *trans,
|
||||
struct bkey unpacked;
|
||||
int sectors;
|
||||
|
||||
_k = bch2_btree_node_iter_peek_filter(&node_iter, l->b,
|
||||
KEY_TYPE_discard);
|
||||
_k = bch2_btree_node_iter_peek(&node_iter, l->b);
|
||||
if (!_k)
|
||||
return BTREE_INSERT_OK;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user