summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_iter.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-12-30 13:08:26 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:33 -0400
commit54e86b581306295444ba149bf20106ce518b425f (patch)
tree836b73c854f21b8df04fd434635ef82071769363 /fs/bcachefs/btree_iter.c
parentf21539a56d9753e702d4aa8b71ac1dd6de85f570 (diff)
downloadlwn-54e86b581306295444ba149bf20106ce518b425f.tar.gz
lwn-54e86b581306295444ba149bf20106ce518b425f.zip
bcachefs: Make btree_insert_entry more private to update path
This should be private to btree_update_leaf.c, and we might end up removing it. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_iter.c')
-rw-r--r--fs/bcachefs/btree_iter.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c
index c002ac958899..0cd1b84c02ba 100644
--- a/fs/bcachefs/btree_iter.c
+++ b/fs/bcachefs/btree_iter.c
@@ -1810,8 +1810,8 @@ static int bch2_trans_realloc_iters(struct btree_trans *trans,
bch2_trans_unlock(trans);
iters_bytes = sizeof(struct btree_iter) * new_size;
- updates_bytes = sizeof(struct btree_insert_entry) * (new_size + 4);
- sorted_bytes = sizeof(u8) * (new_size + 4);
+ updates_bytes = sizeof(struct btree_insert_entry) * new_size;
+ sorted_bytes = sizeof(u8) * new_size;
new_iters = kmalloc(iters_bytes +
updates_bytes +
@@ -2164,6 +2164,6 @@ int bch2_fs_btree_iter_init(struct bch_fs *c)
return mempool_init_kmalloc_pool(&c->btree_iters_pool, 1,
sizeof(struct btree_iter) * nr +
- sizeof(struct btree_insert_entry) * (nr + 4) +
- sizeof(u8) * (nr + 4));
+ sizeof(struct btree_insert_entry) * nr +
+ sizeof(u8) * nr);
}