projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72492d5
)
bcachefs: Use kvmalloc() for array of sorted keys in journal replay
author
Kent Overstreet
<kent.overstreet@gmail.com>
Mon, 3 Jan 2022 09:17:02 +0000
(
04:17
-0500)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:21 +0000
(17:09 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/recovery.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/recovery.c
b/fs/bcachefs/recovery.c
index cb0ba84711aa13d1065af18518f431a1195f2ada..e4ba3f0aef4abb6ad99d7f7899badce6289e7afd 100644
(file)
--- 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 = k
v
malloc_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);
+ k
v
free(keys_sorted);
return ret;
}