@@ -1431,15 +1431,6 @@ void bch2_path_put(struct btree_trans *trans, btree_path_idx_t path_idx, bool in
1431
1431
__bch2_path_free (trans , path_idx );
1432
1432
}
1433
1433
1434
- static void bch2_path_put_nokeep (struct btree_trans * trans , btree_path_idx_t path ,
1435
- bool intent )
1436
- {
1437
- if (!__btree_path_put (trans , trans -> paths + path , intent ))
1438
- return ;
1439
-
1440
- __bch2_path_free (trans , path );
1441
- }
1442
-
1443
1434
void __noreturn bch2_trans_restart_error (struct btree_trans * trans , u32 restart_count )
1444
1435
{
1445
1436
panic ("trans->restart_count %u, should be %u, last restarted by %pS\n" ,
@@ -2358,8 +2349,7 @@ struct bkey_s_c bch2_btree_iter_peek_max(struct btree_trans *trans, struct btree
2358
2349
}
2359
2350
2360
2351
if (iter -> update_path ) {
2361
- bch2_path_put_nokeep (trans , iter -> update_path ,
2362
- iter -> flags & BTREE_ITER_intent );
2352
+ bch2_path_put (trans , iter -> update_path , iter -> flags & BTREE_ITER_intent );
2363
2353
iter -> update_path = 0 ;
2364
2354
}
2365
2355
@@ -2388,8 +2378,8 @@ struct bkey_s_c bch2_btree_iter_peek_max(struct btree_trans *trans, struct btree
2388
2378
2389
2379
if (iter -> update_path &&
2390
2380
!bkey_eq (trans -> paths [iter -> update_path ].pos , k .k -> p )) {
2391
- bch2_path_put_nokeep (trans , iter -> update_path ,
2392
- iter -> flags & BTREE_ITER_intent );
2381
+ bch2_path_put (trans , iter -> update_path ,
2382
+ iter -> flags & BTREE_ITER_intent );
2393
2383
iter -> update_path = 0 ;
2394
2384
}
2395
2385
@@ -2648,7 +2638,7 @@ struct bkey_s_c bch2_btree_iter_peek_prev_min(struct btree_trans *trans, struct
2648
2638
* the last possible snapshot overwrite, return
2649
2639
* it:
2650
2640
*/
2651
- bch2_path_put_nokeep (trans , iter -> path ,
2641
+ bch2_path_put (trans , iter -> path ,
2652
2642
iter -> flags & BTREE_ITER_intent );
2653
2643
iter -> path = saved_path ;
2654
2644
saved_path = 0 ;
@@ -2678,8 +2668,8 @@ struct bkey_s_c bch2_btree_iter_peek_prev_min(struct btree_trans *trans, struct
2678
2668
* our previous saved candidate:
2679
2669
*/
2680
2670
if (saved_path ) {
2681
- bch2_path_put_nokeep (trans , saved_path ,
2682
- iter -> flags & BTREE_ITER_intent );
2671
+ bch2_path_put (trans , saved_path ,
2672
+ iter -> flags & BTREE_ITER_intent );
2683
2673
saved_path = 0 ;
2684
2674
}
2685
2675
@@ -2722,7 +2712,7 @@ struct bkey_s_c bch2_btree_iter_peek_prev_min(struct btree_trans *trans, struct
2722
2712
iter -> pos .snapshot = iter -> snapshot ;
2723
2713
out_no_locked :
2724
2714
if (saved_path )
2725
- bch2_path_put_nokeep (trans , saved_path , iter -> flags & BTREE_ITER_intent );
2715
+ bch2_path_put (trans , saved_path , iter -> flags & BTREE_ITER_intent );
2726
2716
2727
2717
bch2_btree_iter_verify_entry_exit (iter );
2728
2718
bch2_btree_iter_verify (trans , iter );
@@ -3045,7 +3035,7 @@ static inline void btree_path_list_add(struct btree_trans *trans,
3045
3035
void bch2_trans_iter_exit (struct btree_trans * trans , struct btree_iter * iter )
3046
3036
{
3047
3037
if (iter -> update_path )
3048
- bch2_path_put_nokeep (trans , iter -> update_path ,
3038
+ bch2_path_put (trans , iter -> update_path ,
3049
3039
iter -> flags & BTREE_ITER_intent );
3050
3040
if (iter -> path )
3051
3041
bch2_path_put (trans , iter -> path ,
0 commit comments