diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-07-16 20:20:21 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-07-18 18:33:30 -0400 |
commit | 6f719cbe0c8b3b8a14b403b9e60fdb565fd829fe (patch) | |
tree | 940ec29d7b6741e471ff7a900e072dc962247ff3 | |
parent | f05a0b9c73bc1728b130ac8d1d76b7bbf3f0241d (diff) |
bcachefs: Fix integer overflow on trans->nr_updatesbcachefs-2024-07-18
We can't have more updates than paths, so btree_path_idx_t is the
correct type to use.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/btree_types.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_types.h b/fs/bcachefs/btree_types.h index 79898f687772..b256b2a20a4f 100644 --- a/fs/bcachefs/btree_types.h +++ b/fs/bcachefs/btree_types.h @@ -477,8 +477,8 @@ struct btree_trans { btree_path_idx_t nr_sorted; btree_path_idx_t nr_paths; btree_path_idx_t nr_paths_max; + btree_path_idx_t nr_updates; u8 fn_idx; - u8 nr_updates; u8 lock_must_abort; bool lock_may_not_fail:1; bool srcu_held:1; |