projects
/
platform
/
upstream
/
erofs-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4102c47
)
erofs-utils: mkfs: fix inaccurate assertion of hardlinks in rebuild mode
author
Gao Xiang
<hsiangkao@linux.alibaba.com>
Mon, 9 Sep 2024 11:13:05 +0000
(19:13 +0800)
committer
Gao Xiang
<hsiangkao@linux.alibaba.com>
Mon, 9 Sep 2024 11:19:07 +0000
(19:19 +0800)
`erofs_parent_inode(inode) == dir` is only true for non-hardlink
inodes and directories.
Only debug builds are impacted.
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link:
https://lore.kernel.org/r/20240909111305.1850391-1-hsiangkao@linux.alibaba.com
lib/inode.c
patch
|
blob
|
history
diff --git
a/lib/inode.c
b/lib/inode.c
index d464bc6fdbd76598be83b701619990836d640af3..bc3cb76e8bf2282cb28c49c2fe997601eb143630 100644
(file)
--- a/
lib/inode.c
+++ b/
lib/inode.c
@@
-1744,7
+1744,8
@@
static int erofs_mkfs_dump_tree(struct erofs_inode *root, bool rebuild,
continue;
if (!erofs_inode_visited(inode)) {
- DBG_BUGON(rebuild &&
+ DBG_BUGON(rebuild && (inode->i_nlink == 1 ||
+ S_ISDIR(inode->i_mode)) &&
erofs_parent_inode(inode) != dir);
erofs_mark_parent_inode(inode, dir);