diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-13 21:17:19 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-14 23:44:44 -0500 |
commit | db18ef1a02bc2cd924f86b2582302f2c2711b67c (patch) | |
tree | e860b1a0cb1fe459c4e4ff07f9490fbe4e596add /fs/bcachefs | |
parent | 7125063fc6dfb77138b3a100527f3d8f9203ff2a (diff) | |
download | lwn-db18ef1a02bc2cd924f86b2582302f2c2711b67c.tar.gz lwn-db18ef1a02bc2cd924f86b2582302f2c2711b67c.zip |
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>
Diffstat (limited to 'fs/bcachefs')
-rw-r--r-- | fs/bcachefs/fsck.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c index 9f3e9bd3d767..e0c5cd119acc 100644 --- a/fs/bcachefs/fsck.c +++ b/fs/bcachefs/fsck.c @@ -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, |