Skip to contentSkip to conversation

rpdfs: Fix initialization in rpdfs_btree_lookup_cb()

PATCH Applied Chris Kirby 2 participants 2 messages Feb 24 – Feb 25

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rpdfs: Fix initialization in rpdfs_btree_lookup_cb()

Correctly initialize the rpdfs_btree_item_args in rpdfs_btree_lookup_cb(). The code was initializing b twice and c not at all.

Fix a typo.

---
 fs/rpdfs/btree.c     | 2 +-
 fs/rpdfs/btree_txn.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
fs/rpdfs/btree.c +1 -1
index 09d6302a7784..a043a864d451 100644
@@ -694,7 +694,7 @@ int rpdfs_btree_lookup_cb(struct rpdfs_fs_info *rfi, struct rpdfs_btree_block *b
 	ind = find_key_ind(bt, key);
 	init_bti(&a, bt, ind);
 	init_bti(&b, bt, ind + 1);
-	init_bti(&b, bt, ind + 2);
+	init_bti(&c, bt, ind + 2);
 
 	return item_cb(rfi, &a, &b, &c, cb_arg);
 }
fs/rpdfs/btree_txn.c +1 -1
index eedca731d689..dbd73fd4f2a4 100644
@@ -460,7 +460,7 @@ int rpdfs_btree_txn_prepare_lookup(struct rpdfs_fs_info *rfi, struct rpdfs_trans
  * transaction.
  *
  * The caller's key can land after the last item in a leaf block so we
- * won't copy any items even though there are more item in the tree.  If
+ * won't copy any items even though there are more items in the tree.  If
  * this happens we'll advance the search key past the end of the first
  * leaf and try again, but only once.
  */
Signature · 1 line
2.51.1
Applied
#1 lore raw
Quoted 3 lines · Chris Kirby

Correctly initialize the rpdfs_btree_item_args in rpdfs_btree_lookup_cb(). The code was initializing b twice and c not at all.

Applied, thanks!

- z