From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 5/6] fsck.gfs2: Fix wrong entry used in dentry comparison
Date: Mon, 30 Jan 2023 15:21:45 +0000 [thread overview]
Message-ID: <20230130152146.633484-6-anprice@redhat.com> (raw)
In-Reply-To: <20230130152146.633484-1-anprice@redhat.com>
'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 <anprice@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
next prev parent reply other threads:[~2023-01-30 15:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-30 15:21 [Cluster-devel] [PATCH 0/6] gfs2-utils: Cleanups and fsck.gfs2 fixes Andrew Price
2023-01-30 15:21 ` [Cluster-devel] [PATCH 1/6] libgfs2: Return the inode from lgfs2_lookupi() Andrew Price
2023-01-30 15:21 ` [Cluster-devel] [PATCH 2/6] libgfs2: Remove lgfs2_gfs_createi() Andrew Price
2023-01-30 15:21 ` [Cluster-devel] [PATCH 3/6] libgfs2: Reorganise lgfs2_createi() Andrew Price
2023-01-30 15:21 ` [Cluster-devel] [PATCH 4/6] fsck.gfs2: Remove de variable from dirref_find() Andrew Price
2023-01-30 15:21 ` Andrew Price [this message]
2023-01-30 15:21 ` [Cluster-devel] [PATCH 6/6] fsck.gfs2: fix_hashtable: Decrement i_blocks when freeing leaf blocks Andrew Price
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230130152146.633484-6-anprice@redhat.com \
--to=anprice@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).