'dent' points to the on-disk data that 'dentry' was converted from, so this comparison always evaluates to true. Compare to 'entry' instead.
Signed-off-by: Andrew Price <anpr...@redhat.com> --- gfs2/fsck/pass2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfs2/fsck/pass2.c b/gfs2/fsck/pass2.c index 002bf2cb..5327ee43 100644 --- a/gfs2/fsck/pass2.c +++ b/gfs2/fsck/pass2.c @@ -631,7 +631,7 @@ static int dirref_find(struct fsck_cx *cx, struct lgfs2_inode *ip, struct gfs2_d (*count)++; return 0; } - if (dentry.dr_inum.in_formal_ino == be64_to_cpu(dent->de_inum.no_formal_ino)) { + if (dentry.dr_inum.in_formal_ino == entry->in_formal_ino) { log_debug("Formal inode number matches; must be a hard " "link.\n"); goto out; -- 2.39.0