diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-10-17 14:32:57 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:44 +0300 |
commit | f83009cda309ca1012cc206102284802b86da70b (patch) | |
tree | 65fcb3d12a67add5b383a68d3dbee897c4bb02e6 /fs | |
parent | ef035f42a03888da62cbe29cd2132d78e5ba393a (diff) | |
download | linux-f83009cda309ca1012cc206102284802b86da70b.tar.xz |
bcachefs: Don't issue transaction restart on key cache realloc
This shouldn't be needed anymore, since we don't rely on the pointer
validity that this was guarding against anymore - we get a new good
reference and save it right after this function.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bcachefs/btree_update_leaf.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/bcachefs/btree_update_leaf.c b/fs/bcachefs/btree_update_leaf.c index b60786c20ccf..fc53958e5619 100644 --- a/fs/bcachefs/btree_update_leaf.c +++ b/fs/bcachefs/btree_update_leaf.c @@ -339,7 +339,7 @@ btree_key_can_insert_cached(struct btree_trans *trans, { struct bch_fs *c = trans->c; struct bkey_cached *ck = (void *) path->l[0].b; - unsigned old_u64s = ck->u64s, new_u64s; + unsigned new_u64s; struct bkey_i *new_k; EBUG_ON(path->level); @@ -368,12 +368,7 @@ btree_key_can_insert_cached(struct btree_trans *trans, ck->u64s = new_u64s; ck->k = new_k; - /* - * Keys returned by peek() are no longer valid pointers, so we need a - * transaction restart: - */ - trace_and_count(c, trans_restart_key_cache_key_realloced, trans, _RET_IP_, path, old_u64s, new_u64s); - return btree_trans_restart_nounlock(trans, BCH_ERR_transaction_restart_key_cache_realloced); + return 0; } /* Triggers: */ |