Commit 1640647c authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

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: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 6d758368
......@@ -576,16 +576,9 @@ int bch2_inode_rm(struct bch_fs *c, u64 inode_nr)
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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment