diff options
| author | Alan Huang <mmpgouride@gmail.com> | 2025-06-13 03:01:58 +0800 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-06-15 22:11:55 -0400 |
| commit | e31144f8cbe041a572ca64d9261ceeb647ccf557 (patch) | |
| tree | 81a43212b3e73e1f5eaf530f39c9810056736641 | |
| parent | bcachefs: Fix alloc_req use after free (diff) | |
| download | linux-e31144f8cbe041a572ca64d9261ceeb647ccf557.tar.gz linux-e31144f8cbe041a572ca64d9261ceeb647ccf557.zip | |
bcachefs: Add missing EBUG_ON
Just like the EBUG_ON in bch2_journal_add_entry().
Signed-off-by: Alan Huang <mmpgouride@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
| -rw-r--r-- | fs/bcachefs/btree_trans_commit.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/btree_trans_commit.c b/fs/bcachefs/btree_trans_commit.c index d9710801e3ee..55952143f0d3 100644 --- a/fs/bcachefs/btree_trans_commit.c +++ b/fs/bcachefs/btree_trans_commit.c @@ -757,6 +757,8 @@ bch2_trans_commit_write_locked(struct btree_trans *trans, unsigned flags, btree_trans_journal_entries_start(trans), trans->journal_entries.u64s); + EBUG_ON(trans->journal_res.u64s < trans->journal_entries.u64s); + trans->journal_res.offset += trans->journal_entries.u64s; trans->journal_res.u64s -= trans->journal_entries.u64s; |
