diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-30 15:44:24 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-05-08 17:29:22 -0400 |
commit | f5faf43f853abb40255059d2b5133699c8528eaa (patch) | |
tree | 543537dedbf9e9677051b28633fc56308a107af6 /fs/bcachefs | |
parent | 23f308ae19d345c8fc022edc5aae9a0af172ad73 (diff) | |
download | linux-f5faf43f853abb40255059d2b5133699c8528eaa.tar.gz linux-f5faf43f853abb40255059d2b5133699c8528eaa.tar.bz2 linux-f5faf43f853abb40255059d2b5133699c8528eaa.zip |
bcachefs: Pass device to bch2_alloc_write_key()
More elimating bch2_dev_bkey_exists()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs')
-rw-r--r-- | fs/bcachefs/btree_gc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_gc.c b/fs/bcachefs/btree_gc.c index 133c48c4047d..07b343e7ddeb 100644 --- a/fs/bcachefs/btree_gc.c +++ b/fs/bcachefs/btree_gc.c @@ -865,10 +865,10 @@ static inline bool bch2_alloc_v4_cmp(struct bch_alloc_v4 l, static int bch2_alloc_write_key(struct btree_trans *trans, struct btree_iter *iter, + struct bch_dev *ca, struct bkey_s_c k) { struct bch_fs *c = trans->c; - struct bch_dev *ca = bch2_dev_bkey_exists(c, iter->pos.inode); struct bkey_i_alloc_v4 *a; struct bch_alloc_v4 old_gc, gc, old_convert, new; const struct bch_alloc_v4 *old; @@ -965,7 +965,7 @@ static int bch2_gc_alloc_done(struct bch_fs *c) POS(ca->dev_idx, ca->mi.nbuckets - 1), BTREE_ITER_slots|BTREE_ITER_prefetch, k, NULL, NULL, BCH_TRANS_COMMIT_lazy_rw, - bch2_alloc_write_key(trans, &iter, k))); + bch2_alloc_write_key(trans, &iter, ca, k))); if (ret) { bch2_dev_put(ca); break; |