Skip to content

Commit db18ef1

Browse files
author
Kent Overstreet
committed
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 <[email protected]>
1 parent 7125063 commit db18ef1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/bcachefs/fsck.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2220,7 +2220,7 @@ static int nlink_cmp(const void *_l, const void *_r)
22202220
const struct nlink *l = _l;
22212221
const struct nlink *r = _r;
22222222

2223-
return cmp_int(l->inum, r->inum) ?: cmp_int(l->snapshot, r->snapshot);
2223+
return cmp_int(l->inum, r->inum);
22242224
}
22252225

22262226
static void inc_link(struct bch_fs *c, struct snapshots_seen *s,

0 commit comments

Comments
 (0)