[PATCH v2 2/2] erofs-utils: fsck: verify packed_nid when checking packed inode
Yue Hu
zbestahu at gmail.com
Fri Jun 2 20:18:05 AEST 2023
From: Yue Hu <huyue2 at 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 at 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
More information about the Linux-erofs
mailing list