X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libbcachefs%2Fbtree_iter.h;h=0e9c1cb98a130d0ceef875cfac1d65fa251b1433;hb=c99a444c5cc242a89845be83236aacd7db628ef5;hp=c6129a4346a3b07038f6eb23ce3df70c5b9f7763;hpb=17d1c4f4fe29453fbb4087eb5de8aa6f9e6605c7;p=bcachefs-tools-debian diff --git a/libbcachefs/btree_iter.h b/libbcachefs/btree_iter.h index c6129a4..0e9c1cb 100644 --- a/libbcachefs/btree_iter.h +++ b/libbcachefs/btree_iter.h @@ -283,10 +283,10 @@ static inline void bch2_trans_verify_not_in_restart(struct btree_trans *trans) } __always_inline -static inline int btree_trans_restart_nounlock(struct btree_trans *trans, int err) +static int btree_trans_restart_nounlock(struct btree_trans *trans, int err) { BUG_ON(err <= 0); - BUG_ON(!bch2_err_matches(err, BCH_ERR_transaction_restart)); + BUG_ON(!bch2_err_matches(-err, BCH_ERR_transaction_restart)); trans->restarted = err; trans->last_restarted_ip = _THIS_IP_; @@ -294,7 +294,7 @@ static inline int btree_trans_restart_nounlock(struct btree_trans *trans, int er } __always_inline -static inline int btree_trans_restart(struct btree_trans *trans, int err) +static int btree_trans_restart(struct btree_trans *trans, int err) { btree_trans_restart_nounlock(trans, err); return -err;