diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-09-12 17:16:02 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:13 -0400 |
commit | 6bd68ec266ad71827ef940151067b67b62fb8fed (patch) | |
tree | 158da84712ff58061a2bfbbe6f0e858b58c6140d /fs/bcachefs/lru.c | |
parent | 96dea3d599dbc31f59eb786af2ac5079122beb88 (diff) | |
download | linux-stable-6bd68ec266ad71827ef940151067b67b62fb8fed.tar.gz linux-stable-6bd68ec266ad71827ef940151067b67b62fb8fed.tar.bz2 linux-stable-6bd68ec266ad71827ef940151067b67b62fb8fed.zip |
bcachefs: Heap allocate btree_trans
We're using more stack than we'd like in a number of functions, and
btree_trans is the biggest object that we stack allocate.
But we have to do a heap allocatation to initialize it anyways, so
there's no real downside to heap allocating the entire thing.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/lru.c')
-rw-r--r-- | fs/bcachefs/lru.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/lru.c b/fs/bcachefs/lru.c index 3e8b8f2f38a3..215a653322f3 100644 --- a/fs/bcachefs/lru.c +++ b/fs/bcachefs/lru.c @@ -151,10 +151,10 @@ int bch2_check_lrus(struct bch_fs *c) int ret = 0; ret = bch2_trans_run(c, - for_each_btree_key_commit(&trans, iter, + for_each_btree_key_commit(trans, iter, BTREE_ID_lru, POS_MIN, BTREE_ITER_PREFETCH, k, NULL, NULL, BTREE_INSERT_NOFAIL|BTREE_INSERT_LAZY_RW, - bch2_check_lru_key(&trans, &iter, k, &last_flushed_pos))); + bch2_check_lru_key(trans, &iter, k, &last_flushed_pos))); if (ret) bch_err_fn(c, ret); return ret; |