mirror of
https://github.com/torvalds/linux.git
synced 2024-11-29 07:31:29 +00:00
bcachefs: Use kvmalloc() for array of sorted keys in journal replay
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
72492d55ce
commit
fe312f81ef
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user