Skip to contentSkip to conversation

bcachefs: Remove duplicate call to bch2_trans_begin()

PATCH Applied Alan Huang 2 participants 2 messages May 19, 2025

lore
Share & tools
lore

Alan Huang

author
#0 lore raw

PATCH 1/1 bcachefs: Remove duplicate call to bch2_trans_begin()

There is one in for_each_btree_key_max().

---
 fs/bcachefs/movinggc.c | 2 --
 1 file changed, 2 deletions(-)
fs/bcachefs/movinggc.c +0 -2
index 7cb0b3d347b4..e7a2a13554d7 100644
@@ -154,8 +154,6 @@ static int bch2_copygc_get_buckets(struct moving_context *ctxt,
 	if (bch2_fs_fatal_err_on(ret, c, "%s: from bch2_btree_write_buffer_tryflush()", bch2_err_str(ret)))
 		return ret;
 
-	bch2_trans_begin(trans);
-
 	ret = for_each_btree_key_max(trans, iter, BTREE_ID_lru,
 				  lru_pos(BCH_LRU_BUCKET_FRAGMENTATION, 0, 0),
 				  lru_pos(BCH_LRU_BUCKET_FRAGMENTATION, U64_MAX, LRU_TIME_MAX),
Signature · 1 line
2.48.1
#1 lore raw
Quoted 3 lines · Alan Huang

There is one in for_each_btree_key_max().

Applied

Quoted 20 lines
---
 fs/bcachefs/movinggc.c | 2 --
 1 file changed, 2 deletions(-)
fs/bcachefs/movinggc.c +0 -2
index 7cb0b3d347b4..e7a2a13554d7 100644
@@ -154,8 +154,6 @@ static int bch2_copygc_get_buckets(struct moving_context *ctxt,
 	if (bch2_fs_fatal_err_on(ret, c, "%s: from bch2_btree_write_buffer_tryflush()", bch2_err_str(ret)))
 		return ret;
 
-	bch2_trans_begin(trans);
-
 	ret = for_each_btree_key_max(trans, iter, BTREE_ID_lru,
 				  lru_pos(BCH_LRU_BUCKET_FRAGMENTATION, 0, 0),
 				  lru_pos(BCH_LRU_BUCKET_FRAGMENTATION, U64_MAX, LRU_TIME_MAX),
Signature · 1 line
2.48.1