void bch2_btree_add_journal_pin(struct bch_fs *, struct btree *, u64);
enum btree_insert_flags {
- __BTREE_INSERT_NOUNLOCK,
__BTREE_INSERT_NOFAIL,
__BTREE_INSERT_NOCHECK_RW,
__BTREE_INSERT_LAZY_RW,
__BCH_HASH_SET_MUST_REPLACE,
};
-/*
- * Don't drop locks _after_ successfully updating btree:
- */
-#define BTREE_INSERT_NOUNLOCK (1 << __BTREE_INSERT_NOUNLOCK)
-
/* Don't check for -ENOSPC: */
#define BTREE_INSERT_NOFAIL (1 << __BTREE_INSERT_NOFAIL)
({ \
int _ret; \
\
- while (1) { \
+ do { \
+ bch2_trans_begin(_trans); \
_ret = (_do); \
- if (_ret != -EINTR) \
- break; \
- bch2_trans_reset(_trans, 0); \
- } \
+ } while (_ret == -EINTR); \
\
_ret; \
})