summaryrefslogtreecommitdiff
path: root/fs/bcachefs
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-11-13 16:51:02 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:47 -0400
commit1640647c04bf0963e51aaec595af026d383352d6 (patch)
tree9991063bbcd2953d840dd2d706afc842e891e74f /fs/bcachefs
parent6d758368f1265ca9d0b7a077caf1ca9e9859c8c8 (diff)
bcachefs: Inode delete doesn't need to flush key cache anymore
Inode create checks to make sure the slot doesn't exist in the btree key cache. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs')
-rw-r--r--fs/bcachefs/inode.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/bcachefs/inode.c b/fs/bcachefs/inode.c
index 8e52d475b397..f00778d78271 100644
--- a/fs/bcachefs/inode.c
+++ b/fs/bcachefs/inode.c
@@ -576,16 +576,9 @@ retry:
bi_generation = 0;
- ret = bch2_btree_key_cache_flush(&trans, BTREE_ID_INODES, POS(0, inode_nr));
- if (ret) {
- if (ret != -EINTR)
- bch_err(c, "error flushing btree key cache: %i", ret);
- goto err;
- }
-
iter = bch2_trans_get_iter(&trans, BTREE_ID_INODES, POS(0, inode_nr),
- BTREE_ITER_SLOTS|BTREE_ITER_INTENT);
- k = bch2_btree_iter_peek_slot(iter);
+ BTREE_ITER_CACHED|BTREE_ITER_INTENT);
+ k = bch2_btree_iter_peek_cached(iter);
ret = bkey_err(k);
if (ret)