From: Yue Hu <zbestahu@gmail.com>
To: linux-erofs@lists.ozlabs.org
Cc: sunshijie@xiaomi.com, huyue2@coolpad.com, zhangwen@coolpad.com
Subject: [PATCH v2 2/2] erofs-utils: fsck: verify packed_nid when checking packed inode
Date: Fri, 2 Jun 2023 18:18:05 +0800 [thread overview]
Message-ID: <8e87974be6533d03cff7bf6af222869e7ddba015.1685700307.git.huyue2@coolpad.com> (raw)
In-Reply-To: <d755ab1c4eaa634f8822b6ce663c1d1a66aae09c.1685700307.git.huyue2@coolpad.com>
In-Reply-To: <d755ab1c4eaa634f8822b6ce663c1d1a66aae09c.1685700307.git.huyue2@coolpad.com>
From: Yue Hu <huyue2@coolpad.com>
Since dedupe feature is also using the same feature bit as fragments.
Fixes: 017f5b402d14 ("erofs-utils: fsck: add a check to packed inode")
Signed-off-by: Yue Hu <huyue2@coolpad.com>
---
fsck/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fsck/main.c b/fsck/main.c
index ad40537..7864318 100644
--- a/fsck/main.c
+++ b/fsck/main.c
@@ -789,7 +789,7 @@ int main(int argc, char **argv)
goto exit_put_super;
}
- if (erofs_sb_has_fragments()) {
+ if (erofs_sb_has_fragments() && sbi.packed_nid > 0) {
err = erofsfsck_check_inode(sbi.packed_nid, sbi.packed_nid);
if (err) {
erofs_err("failed to verify packed file");
--
2.17.1
prev parent reply other threads:[~2023-06-02 10:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 10:18 [PATCH v2 1/2] erofs-utils: dump: verify packed_nid when reading packed inode Yue Hu
2023-06-02 10:18 ` Yue Hu [this message]
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=8e87974be6533d03cff7bf6af222869e7ddba015.1685700307.git.huyue2@coolpad.com \
--to=zbestahu@gmail.com \
--cc=huyue2@coolpad.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=sunshijie@xiaomi.com \
--cc=zhangwen@coolpad.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).