summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-03-26 23:46:20 +0100
committerKent Overstreet <kent.overstreet@linux.dev>2024-04-01 02:36:11 +0200
commit83bb58539045b15653b61c6e8eb65f3f9c671cdf (patch)
treeb72044e2e53c21209511309446d7b0ab94e052c4 /fs
parentbcachefs: Fix use after free in bch2_check_fix_ptrs() (diff)
downloadlinux-83bb58539045b15653b61c6e8eb65f3f9c671cdf.tar.xz
linux-83bb58539045b15653b61c6e8eb65f3f9c671cdf.zip
bcachefs: Fix repair path for missing indirect extents
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r--fs/bcachefs/reflink.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/bcachefs/reflink.c b/fs/bcachefs/reflink.c
index c47c66c2b394..ff7864731a07 100644
--- a/fs/bcachefs/reflink.c
+++ b/fs/bcachefs/reflink.c
@@ -185,8 +185,7 @@ not_found:
} else {
bkey_error_init(update);
update->k.p = p.k->p;
- update->k.p.offset = next_idx;
- update->k.size = next_idx - *idx;
+ update->k.size = p.k->size;
set_bkey_val_u64s(&update->k, 0);
}