Skip to content

Commit d287866

Browse files
author
Kent Overstreet
committed
bcachefs: Fix trans_commit disk accounting revert
We only are applying JSET_ENTRY_TYPE_write_buffer_keys, revert path was missed. Fixes: a3581ca ("bcachefs: Fix BCH_TRANS_COMMIT_skip_accounting_apply") Signed-off-by: Kent Overstreet <[email protected]>
1 parent 3b1425a commit d287866

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/bcachefs/btree_trans_commit.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,8 @@ bch2_trans_commit_write_locked(struct btree_trans *trans, unsigned flags,
832832
for (struct jset_entry *entry2 = trans->journal_entries;
833833
entry2 != entry;
834834
entry2 = vstruct_next(entry2))
835-
if (jset_entry_is_key(entry2) && entry2->start->k.type == KEY_TYPE_accounting) {
835+
if (entry2->type == BCH_JSET_ENTRY_write_buffer_keys &&
836+
entry2->start->k.type == KEY_TYPE_accounting) {
836837
struct bkey_s_accounting a = bkey_i_to_s_accounting(entry2->start);
837838

838839
bch2_accounting_neg(a);

0 commit comments

Comments
 (0)