summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-01-03 04:17:02 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:21 -0400
commitfe312f81ef62f8aec0c21dabb703baeb4a7533fc (patch)
treeb39cbb80617ef12257a3426bcc8033d596567572 /fs
parent72492d55cea359c2fce3e372da5c7387b50a21ef (diff)
downloadlwn-fe312f81ef62f8aec0c21dabb703baeb4a7533fc.tar.gz
lwn-fe312f81ef62f8aec0c21dabb703baeb4a7533fc.zip
bcachefs: Use kvmalloc() for array of sorted keys in journal replay
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/bcachefs/recovery.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index cb0ba84711aa..e4ba3f0aef4a 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -519,7 +519,7 @@ static int bch2_journal_replay(struct bch_fs *c)
size_t i;
int ret;
- keys_sorted = kmalloc_array(sizeof(*keys_sorted), keys->nr, GFP_KERNEL);
+ keys_sorted = kvmalloc_array(sizeof(*keys_sorted), keys->nr, GFP_KERNEL);
if (!keys_sorted)
return -ENOMEM;
@@ -563,7 +563,7 @@ static int bch2_journal_replay(struct bch_fs *c)
bch2_journal_flush_all_pins(j);
ret = bch2_journal_error(j);
err:
- kfree(keys_sorted);
+ kvfree(keys_sorted);
return ret;
}