Skip to content
Snippets Groups Projects
Commit 85ac31fe authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'bcachefs-2025-03-14.2' of git://evilpiepirate.org/bcachefs

Pull another bcachefs hotfix from Kent Overstreet:

 - fix 32 bit build breakage

* tag 'bcachefs-2025-03-14.2' of git://evilpiepirate.org/bcachefs:
  bcachefs: fix build on 32 bit in get_random_u64_below()
parents 2bda981b 1a2b74d0
No related branches found
No related tags found
No related merge requests found
......@@ -663,7 +663,8 @@ u64 bch2_get_random_u64_below(u64 ceil)
u64 mult = ceil * rand;
if (unlikely(mult < ceil)) {
u64 bound = -ceil % ceil;
u64 bound;
div64_u64_rem(-ceil, ceil, &bound);
while (unlikely(mult < bound)) {
rand = get_random_u64();
mult = ceil * rand;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment