From: Kent Overstreet Date: Fri, 13 Jun 2025 22:49:54 +0000 (-0400) Subject: bcachefs: fsck: fix add_inode() X-Git-Tag: v6.16-rc4~24^2~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b17d7bdb128c50025fc3eb7a9e57b3c7caa4a5ac;p=thirdparty%2Flinux.git bcachefs: fsck: fix add_inode() the inode btree uses the offset field for the inum, not the inode field. Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c index b80a56e19b403..28ca07c0e029b 100644 --- a/fs/bcachefs/fsck.c +++ b/fs/bcachefs/fsck.c @@ -806,7 +806,7 @@ static int add_inode(struct bch_fs *c, struct inode_walker *w, if (!n->whiteout) { return bch2_inode_unpack(inode, &n->inode); } else { - n->inode.bi_inum = inode.k->p.inode; + n->inode.bi_inum = inode.k->p.offset; n->inode.bi_snapshot = inode.k->p.snapshot; return 0; }