summaryrefslogtreecommitdiff
path: root/libbcachefs/btree_gc.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-10-23 17:39:22 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2022-10-23 18:24:08 -0400
commitae43a58d97fc00e31770142da832fb8a249808eb (patch)
tree95c8fced05f8054eb135b309417415dfa3e5eb18 /libbcachefs/btree_gc.c
parent188b6d0c8ef1c02462a744b176557c27220112c9 (diff)
Update bcachefs sources to 70fa0c1ff4 fixup! bcachefs: Btree key cache improvements
Diffstat (limited to 'libbcachefs/btree_gc.c')
-rw-r--r--libbcachefs/btree_gc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbcachefs/btree_gc.c b/libbcachefs/btree_gc.c
index 801a09f6..20e804ec 100644
--- a/libbcachefs/btree_gc.c
+++ b/libbcachefs/btree_gc.c
@@ -199,7 +199,7 @@ static int set_node_min(struct bch_fs *c, struct btree *b, struct bpos new_min)
struct bkey_i_btree_ptr_v2 *new;
int ret;
- new = kmalloc(BKEY_BTREE_PTR_U64s_MAX * sizeof(u64), GFP_KERNEL);
+ new = kmalloc_array(BKEY_BTREE_PTR_U64s_MAX, sizeof(u64), GFP_KERNEL);
if (!new)
return -ENOMEM;
@@ -228,7 +228,7 @@ static int set_node_max(struct bch_fs *c, struct btree *b, struct bpos new_max)
if (ret)
return ret;
- new = kmalloc(BKEY_BTREE_PTR_U64s_MAX * sizeof(u64), GFP_KERNEL);
+ new = kmalloc_array(BKEY_BTREE_PTR_U64s_MAX, sizeof(u64), GFP_KERNEL);
if (!new)
return -ENOMEM;