aboutsummaryrefslogtreecommitdiff
path: root/fs/bcachefs/recovery.c
diff options
context:
space:
mode:
authorGravatar Kent Overstreet <kent.overstreet@linux.dev> 2023-10-31 18:05:22 -0400
committerGravatar Kent Overstreet <kent.overstreet@linux.dev> 2023-11-04 14:17:11 -0400
commit6dfa10ab22a6a322269a3454d7ac720dc2f8bf11 (patch)
treee27926b981d8aa5eb8f282747d34c11e55f0f4db /fs/bcachefs/recovery.c
parentbcachefs: Fix MEAN_AND_VARIANCE kconfig options (diff)
downloadlinux-6dfa10ab22a6a322269a3454d7ac720dc2f8bf11.tar.gz
linux-6dfa10ab22a6a322269a3454d7ac720dc2f8bf11.tar.bz2
linux-6dfa10ab22a6a322269a3454d7ac720dc2f8bf11.zip
bcachefs: Fix build errors with gcc 10
gcc 10 seems to complain about array bounds in situations where gcc 11 does not - curious. This unfortunately requires adding some casts for now; we may investigate getting rid of our __u64 _data[] VLA in a future patch so that our start[0] members can be VLAs. Reported-by: John Stoffel <john@stoffel.org> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/recovery.c')
-rw-r--r--fs/bcachefs/recovery.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index f73338f37bf1..9600b8083175 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -226,7 +226,7 @@ static int journal_replay_entry_early(struct bch_fs *c,
if (entry->u64s) {
r->level = entry->level;
- bkey_copy(&r->key, &entry->start[0]);
+ bkey_copy(&r->key, (struct bkey_i *) entry->start);
r->error = 0;
} else {
r->error = -EIO;