Skip to contentSkip to conversation

bcachefs: Delete dead code

PATCH Applied Alan Huang 2 participants 2 messages Sep 27, 2024 – Sep 28, 2024

lore
Share & tools
lore

Alan Huang

author
#0 lore raw

PATCH 1/1 bcachefs: Delete dead code

lock_fail_root_changed has not been used since commit 0d7009d7ca99 ("bcachefs: Delete old deadlock avoidance code")

Remove it.

---
 fs/bcachefs/btree_iter.c | 2 --
 fs/bcachefs/errcode.h    | 1 -
 2 files changed, 3 deletions(-)
fs/bcachefs/btree_iter.c +0 -2
index bfe9f0c1e1be..85fe04612454 100644
@@ -748,8 +748,6 @@ static inline int btree_path_lock_root(struct btree_trans *trans,
 		ret = btree_node_lock(trans, path, &b->c,
 				      path->level, lock_type, trace_ip);
 		if (unlikely(ret)) {
-			if (bch2_err_matches(ret, BCH_ERR_lock_fail_root_changed))
-				continue;
 			if (bch2_err_matches(ret, BCH_ERR_transaction_restart))
 				return ret;
 			BUG();
fs/bcachefs/errcode.h +0 -1
index 60b7875adada..866cfdb4d24c 100644
@@ -162,7 +162,6 @@
 	x(BCH_ERR_btree_insert_fail,	btree_insert_need_journal_res)		\
 	x(BCH_ERR_btree_insert_fail,	btree_insert_need_journal_reclaim)	\
 	x(0,				backpointer_to_overwritten_btree_node)	\
-	x(0,				lock_fail_root_changed)			\
 	x(0,				journal_reclaim_would_deadlock)		\
 	x(EINVAL,			fsck)					\
 	x(BCH_ERR_fsck,			fsck_fix)				\
Signature · 1 line
2.45.2