From: Kent Overstreet Date: Mon, 7 Oct 2019 20:22:35 +0000 (-0400) Subject: bcachefs: Fix bch2_extent_ptr_durability() X-Git-Tag: v6.7-rc1~201^2~2308 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9ef6068c4dce124235b335847570ae8f2bf2911d;p=thirdparty%2Fkernel%2Flinux.git bcachefs: Fix bch2_extent_ptr_durability() We were looking up the wrong entry in the stripes radix tree. Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/extents.c b/fs/bcachefs/extents.c index 41a2b36f1d2f7..a8c2081cdd250 100644 --- a/fs/bcachefs/extents.c +++ b/fs/bcachefs/extents.c @@ -79,7 +79,7 @@ static unsigned bch2_extent_ptr_durability(struct bch_fs *c, for (i = 0; i < p.ec_nr; i++) { struct stripe *s = - genradix_ptr(&c->stripes[0], p.idx); + genradix_ptr(&c->stripes[0], p.ec[i].idx); if (WARN_ON(!s)) continue;