Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bcachefs: Fix bch2_check_nlinks() for snapshots

When searching the link table for the matching inode, we were searching
for a specific - incorrect - snapshot ID as well, causing us to fail to
find the inode.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>

+1 -1
+1 -1
fs/bcachefs/fsck.c
··· 2220 2220 const struct nlink *l = _l; 2221 2221 const struct nlink *r = _r; 2222 2222 2223 - return cmp_int(l->inum, r->inum) ?: cmp_int(l->snapshot, r->snapshot); 2223 + return cmp_int(l->inum, r->inum); 2224 2224 } 2225 2225 2226 2226 static void inc_link(struct bch_fs *c, struct snapshots_seen *s,