bcachefs: Change lockrestart_do() to always call bch2_trans_begin()

More consistent behaviour means less likely to trip over ourselves in
silly ways.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
Kent Overstreet 2021-07-28 16:17:10 -04:00 committed by Kent Overstreet
parent a88171c9e6
commit 3cc5288a62

View file

@ -110,12 +110,10 @@ static inline int bch2_trans_commit(struct btree_trans *trans,
({ \
int _ret; \
\
while (1) { \
_ret = (_do); \
if (_ret != -EINTR) \
break; \
do { \
bch2_trans_begin(_trans); \
} \
_ret = (_do); \
} while (_ret == -EINTR); \
\
_ret; \
})