Skip to content

Commit 6f719cb

Browse files
author
Kent Overstreet
committed
bcachefs: Fix integer overflow on trans->nr_updates
We can't have more updates than paths, so btree_path_idx_t is the correct type to use. Signed-off-by: Kent Overstreet <[email protected]>
1 parent f05a0b9 commit 6f719cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/bcachefs/btree_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,8 +477,8 @@ struct btree_trans {
477477
btree_path_idx_t nr_sorted;
478478
btree_path_idx_t nr_paths;
479479
btree_path_idx_t nr_paths_max;
480+
btree_path_idx_t nr_updates;
480481
u8 fn_idx;
481-
u8 nr_updates;
482482
u8 lock_must_abort;
483483
bool lock_may_not_fail:1;
484484
bool srcu_held:1;

0 commit comments

Comments
 (0)