From: Kent Overstreet Date: Wed, 28 Jul 2021 20:17:10 +0000 (-0400) Subject: bcachefs: Change lockrestart_do() to always call bch2_trans_begin() X-Git-Tag: v6.7-rc1~201^2~1447 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3cc5288a62f2657b99faab428f993673ca9d033f;p=thirdparty%2Flinux.git 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 --- diff --git a/fs/bcachefs/btree_update.h b/fs/bcachefs/btree_update.h index b5f35a4190045..a1f2d98228211 100644 --- a/fs/bcachefs/btree_update.h +++ b/fs/bcachefs/btree_update.h @@ -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; \ })