diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-06-26 18:36:24 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:05 -0400 |
commit | 0fb3355d0a3b055af8735fa25b5af63f4dd9a034 (patch) | |
tree | c898735d5014da4ba15d2711ad5bf500f6cd25f7 /fs/bcachefs/btree_gc.c | |
parent | 298ac24e6346b517148a6645c7c5686565868753 (diff) |
bcachefs: Improve bch2_bkey_make_mut()
bch2_bkey_make_mut() now takes the bkey_s_c by reference and points it
at the new, mutable key.
This helps in some fsck paths that may have multiple repair operations
on the same key.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_gc.c')
-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 4fbd2e545ac2..0c9cba56105c 100644 --- a/fs/bcachefs/btree_gc.c +++ b/fs/bcachefs/btree_gc.c @@ -1585,7 +1585,7 @@ static int bch2_gc_write_reflink_key(struct btree_trans *trans, " should be %u", (bch2_bkey_val_to_text(&buf, c, k), buf.buf), r->refcount)) { - struct bkey_i *new = bch2_bkey_make_mut(trans, iter, k, 0); + struct bkey_i *new = bch2_bkey_make_mut(trans, iter, &k, 0); ret = PTR_ERR_OR_ZERO(new); if (ret) @@ -1913,7 +1913,7 @@ static int gc_btree_gens_key(struct btree_trans *trans, percpu_up_read(&c->mark_lock); return 0; update: - u = bch2_bkey_make_mut(trans, iter, k, 0); + u = bch2_bkey_make_mut(trans, iter, &k, 0); ret = PTR_ERR_OR_ZERO(u); if (ret) return ret; |