[PATCH 13/21] Remove unnecessary init_block() using uninitialized stack variable

Valerie Aurora val at versity.com
Tue Feb 11 13:19:10 PST 2025


Some rewrites resulted in a rogue duplicate init_block() using an
uninitialized block number variable that somehow the compiler didn't
complain about but my language server did. Remove it.

Co-authored-by: Zach Brown <zab at versity.com>
Signed-off-by: Valerie Aurora <val at versity.com>
---
 shared/btree.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/shared/btree.c b/shared/btree.c
index 39d0805..a55da6e 100644
--- a/shared/btree.c
+++ b/shared/btree.c
@@ -582,9 +582,6 @@ static int split_block(struct ngnfs_fs_info *nfi, struct ngnfs_transaction *txn,
 				       &trav->parent_tblk, &trav->parent);
 		if (ret < 0)
 			goto out;
-
-		init_block(trav->parent_tblk, trav->parent, bnr, trav->bt->level + 1,
-			   &min_key, &max_key);
 		insert_parent_ref(trav->parent_tblk, trav->parent, 0, trav->bt);
 	}
 
-- 
2.48.1




More information about the ngnfs-devel mailing list