37 lines
1.2 KiB
Diff
37 lines
1.2 KiB
Diff
From 2cb00966dd7d318400633b66864ceb34dfdcfdc8 Mon Sep 17 00:00:00 2001
|
|
From: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Date: Fri, 25 Oct 2024 22:16:19 -0400
|
|
Subject: [PATCH 065/233] bcachefs: Kill unnecessary iter_rewind() in
|
|
bkey_get_empty_slot()
|
|
Content-Type: text/plain; charset="utf-8"
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Signed-off-by: Alexander Miroshnichenko <alex@millerson.name>
|
|
---
|
|
fs/bcachefs/btree_update.c | 7 ++-----
|
|
1 file changed, 2 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/fs/bcachefs/btree_update.c b/fs/bcachefs/btree_update.c
|
|
index 6afd77c68411..f3d7ca3d92b9 100644
|
|
--- a/fs/bcachefs/btree_update.c
|
|
+++ b/fs/bcachefs/btree_update.c
|
|
@@ -588,12 +588,9 @@ struct jset_entry *__bch2_trans_jset_entry_alloc(struct btree_trans *trans, unsi
|
|
int bch2_bkey_get_empty_slot(struct btree_trans *trans, struct btree_iter *iter,
|
|
enum btree_id btree, struct bpos end)
|
|
{
|
|
- struct bkey_s_c k;
|
|
- int ret = 0;
|
|
-
|
|
bch2_trans_iter_init(trans, iter, btree, POS_MAX, BTREE_ITER_intent);
|
|
- k = bch2_btree_iter_prev(iter);
|
|
- ret = bkey_err(k);
|
|
+ struct bkey_s_c k = bch2_btree_iter_peek_prev(iter);
|
|
+ int ret = bkey_err(k);
|
|
if (ret)
|
|
goto err;
|
|
|
|
--
|
|
2.45.2
|
|
|