summaryrefslogtreecommitdiff
path: root/libbcachefs/mean_and_variance.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-07-15 16:54:30 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-07-15 20:17:37 -0400
commit32fbdff2a9954037bb55f3441281376cfcebb8ea (patch)
tree81064d0de40cc6d19991787b94e8ac3d46d62ddb /libbcachefs/mean_and_variance.h
parent2d605676853ffd147f5f9591c833e44ab1d3e7a1 (diff)
Update bcachefs sources to 4a7a003763f5 bcachefs: Opt_durability can now be set via bch2_opt_set_sb()
Diffstat (limited to 'libbcachefs/mean_and_variance.h')
-rw-r--r--libbcachefs/mean_and_variance.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libbcachefs/mean_and_variance.h b/libbcachefs/mean_and_variance.h
index 4fcf062d..47e4a3c3 100644
--- a/libbcachefs/mean_and_variance.h
+++ b/libbcachefs/mean_and_variance.h
@@ -111,11 +111,11 @@ static inline u128_u u128_shl(u128_u i, s8 shift)
{
u128_u r;
- r.lo = i.lo << shift;
+ r.lo = i.lo << (shift & 63);
if (shift < 64)
- r.hi = (i.hi << shift) | (i.lo >> (64 - shift));
+ r.hi = (i.hi << (shift & 63)) | (i.lo >> (-shift & 63));
else {
- r.hi = i.lo << (shift - 64);
+ r.hi = i.lo << (-shift & 63);
r.lo = 0;
}
return r;