From: Andrew Price Date: Mon, 30 Jan 2023 15:21:45 +0000 Subject: [Cluster-devel] [PATCH 5/6] fsck.gfs2: Fix wrong entry used in dentry comparison In-Reply-To: <20230130152146.633484-1-anprice@redhat.com> References: <20230130152146.633484-1-anprice@redhat.com> Message-ID: <20230130152146.633484-6-anprice@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit '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 --- 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