@@ -771,7 +771,7 @@ static inline void __bch2_trans_unlock(struct btree_trans *trans)
771771}
772772
773773static noinline __cold void bch2_trans_relock_fail (struct btree_trans * trans , struct btree_path * path ,
774- struct get_locks_fail * f , bool trace )
774+ struct get_locks_fail * f , bool trace , ulong ip )
775775{
776776 if (!trace )
777777 goto out ;
@@ -796,7 +796,7 @@ static noinline __cold void bch2_trans_relock_fail(struct btree_trans *trans, st
796796 prt_printf (& buf , " total locked %u.%u.%u" , c .n [0 ], c .n [1 ], c .n [2 ]);
797797 }
798798
799- trace_trans_restart_relock (trans , _RET_IP_ , buf .buf );
799+ trace_trans_restart_relock (trans , ip , buf .buf );
800800 printbuf_exit (& buf );
801801 }
802802
@@ -806,7 +806,7 @@ static noinline __cold void bch2_trans_relock_fail(struct btree_trans *trans, st
806806 bch2_trans_verify_locks (trans );
807807}
808808
809- static inline int __bch2_trans_relock (struct btree_trans * trans , bool trace )
809+ static inline int __bch2_trans_relock (struct btree_trans * trans , bool trace , ulong ip )
810810{
811811 bch2_trans_verify_locks (trans );
812812
@@ -825,7 +825,7 @@ static inline int __bch2_trans_relock(struct btree_trans *trans, bool trace)
825825 if (path -> should_be_locked &&
826826 (ret = btree_path_get_locks (trans , path , false, & f ,
827827 BCH_ERR_transaction_restart_relock ))) {
828- bch2_trans_relock_fail (trans , path , & f , trace );
828+ bch2_trans_relock_fail (trans , path , & f , trace , ip );
829829 return ret ;
830830 }
831831 }
@@ -838,12 +838,12 @@ static inline int __bch2_trans_relock(struct btree_trans *trans, bool trace)
838838
839839int bch2_trans_relock (struct btree_trans * trans )
840840{
841- return __bch2_trans_relock (trans , true);
841+ return __bch2_trans_relock (trans , true, _RET_IP_ );
842842}
843843
844844int bch2_trans_relock_notrace (struct btree_trans * trans )
845845{
846- return __bch2_trans_relock (trans , false);
846+ return __bch2_trans_relock (trans , false, _RET_IP_ );
847847}
848848
849849void bch2_trans_unlock (struct btree_trans * trans )
0 commit comments