summaryrefslogtreecommitdiff
path: root/fs/bcachefs/bkey_methods.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-09-12 18:41:22 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:10:13 -0400
commit96dea3d599dbc31f59eb786af2ac5079122beb88 (patch)
tree2b3bf4a0641f1529bffbda9a02a9c66974e8d6e5 /fs/bcachefs/bkey_methods.c
parentb5e85d4d0ccf819df1ee73db41bf388ddd6e1830 (diff)
bcachefs: Fix W=12 build errors
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bkey_methods.c')
-rw-r--r--fs/bcachefs/bkey_methods.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/bcachefs/bkey_methods.c b/fs/bcachefs/bkey_methods.c
index 82f30ffbfb86..be9f012fc7be 100644
--- a/fs/bcachefs/bkey_methods.c
+++ b/fs/bcachefs/bkey_methods.c
@@ -369,7 +369,6 @@ void __bch2_bkey_compat(unsigned level, enum btree_id btree_id,
{
const struct bkey_ops *ops;
struct bkey uk;
- struct bkey_s u;
unsigned nr_compat = 5;
int i;
@@ -434,7 +433,9 @@ void __bch2_bkey_compat(unsigned level, enum btree_id btree_id,
}
break;
- case 4:
+ case 4: {
+ struct bkey_s u;
+
if (!bkey_packed(k)) {
u = bkey_i_to_s(packed_to_bkey(k));
} else {
@@ -451,6 +452,7 @@ void __bch2_bkey_compat(unsigned level, enum btree_id btree_id,
if (ops->compat)
ops->compat(btree_id, version, big_endian, write, u);
break;
+ }
default:
BUG();
}