diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-02-23 22:43:24 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-13 21:22:25 -0400 |
commit | 69426613cdf0784e29e1a429c1a2f372a6267c43 (patch) | |
tree | 08d9402cd8f82ccb17731096d4bcd5640bd6fe0b /fs/bcachefs/btree_journal_iter.c | |
parent | 95ffc7fb8c7831ee79ed8d2c0e53c7b4869c6338 (diff) |
bcachefs: improve move_gap()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_journal_iter.c')
-rw-r--r-- | fs/bcachefs/btree_journal_iter.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/bcachefs/btree_journal_iter.c b/fs/bcachefs/btree_journal_iter.c index 9291a897abab..207dd32e2ecc 100644 --- a/fs/bcachefs/btree_journal_iter.c +++ b/fs/bcachefs/btree_journal_iter.c @@ -218,8 +218,7 @@ int bch2_journal_key_insert_take(struct bch_fs *c, enum btree_id id, journal_iters_move_gap(c, keys->gap, idx); - move_gap(keys->data, keys->nr, keys->size, keys->gap, idx); - keys->gap = idx; + move_gap(keys, idx); keys->nr++; keys->data[keys->gap++] = n; @@ -473,8 +472,7 @@ void bch2_journal_keys_put(struct bch_fs *c) if (!atomic_dec_and_test(&keys->ref)) return; - move_gap(keys->data, keys->nr, keys->size, keys->gap, keys->nr); - keys->gap = keys->nr; + move_gap(keys, keys->nr); darray_for_each(*keys, i) if (i->allocated) |