summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/bkey_methods.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-07-07 04:47:42 +0200
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 23:10:06 +0200
commit73bd774d28d2b2e6a05c31bf7afb9247e02a8e49 (patch)
tree21ab80d4b966d92647ea178bc5707a8534e5d123 /fs/bcachefs/bkey_methods.c
parentbcachefs: Refactor bch_sb_field_ops handling (diff)
downloadlinux-73bd774d28d2b2e6a05c31bf7afb9247e02a8e49.tar.xz
linux-73bd774d28d2b2e6a05c31bf7afb9247e02a8e49.zip
bcachefs: Assorted sparse fixes
- endianness fixes - mark some things static - fix a few __percpu annotations - fix silent enum conversions Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bkey_methods.c')
-rw-r--r--fs/bcachefs/bkey_methods.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/bkey_methods.c b/fs/bcachefs/bkey_methods.c
index 59a4f4802ee9..985ea2daa886 100644
--- a/fs/bcachefs/bkey_methods.c
+++ b/fs/bcachefs/bkey_methods.c
@@ -480,7 +480,7 @@ void __bch2_bkey_compat(unsigned level, enum btree_id btree_id,
u->k.p.snapshot = write
? 0 : U32_MAX;
} else {
- u64 min_packed = f->field_offset[BKEY_FIELD_SNAPSHOT];
+ u64 min_packed = le64_to_cpu(f->field_offset[BKEY_FIELD_SNAPSHOT]);
u64 max_packed = min_packed +
~(~0ULL << f->bits_per_field[BKEY_FIELD_SNAPSHOT]);