diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-05-15 15:47:43 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:22 -0400 |
commit | 3838be78410cfe52a067b8e88dfcff922084e627 (patch) | |
tree | 1cd150d18e1dada5dd07eee705be0201461f8315 /fs/bcachefs/btree_iter.c | |
parent | 61011ea237852ef7d29b7d6b3608a6538560fc76 (diff) | |
download | lwn-3838be78410cfe52a067b8e88dfcff922084e627.tar.gz lwn-3838be78410cfe52a067b8e88dfcff922084e627.zip |
bcachefs: Don't use a fixed size buffer for fs_usage_deltas
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_iter.c')
-rw-r--r-- | fs/bcachefs/btree_iter.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c index 10c8350618bc..2579944bb8c1 100644 --- a/fs/bcachefs/btree_iter.c +++ b/fs/bcachefs/btree_iter.c @@ -1949,6 +1949,7 @@ void bch2_trans_init(struct btree_trans *trans, struct bch_fs *c, trans->size = ARRAY_SIZE(trans->iters_onstack); trans->iters = trans->iters_onstack; trans->updates = trans->updates_onstack; + trans->fs_usage_deltas = NULL; if (expected_nr_iters > trans->size) bch2_trans_realloc_iters(trans, expected_nr_iters); @@ -1961,6 +1962,7 @@ int bch2_trans_exit(struct btree_trans *trans) { bch2_trans_unlock(trans); + kfree(trans->fs_usage_deltas); kfree(trans->mem); if (trans->used_mempool) mempool_free(trans->iters, &trans->c->btree_iters_pool); |