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>
This commit is contained in:
parent
7125063fc6
commit
db18ef1a02
@ -2220,7 +2220,7 @@ static int nlink_cmp(const void *_l, const void *_r)
|
||||
const struct nlink *l = _l;
|
||||
const struct nlink *r = _r;
|
||||
|
||||
return cmp_int(l->inum, r->inum) ?: cmp_int(l->snapshot, r->snapshot);
|
||||
return cmp_int(l->inum, r->inum);
|
||||
}
|
||||
|
||||
static void inc_link(struct bch_fs *c, struct snapshots_seen *s,
|
||||
|
Loading…
Reference in New Issue
Block a user