[PATCH 2/2] erofs-utils: fsck: don't set attributes when fscking only

Gao Xiang hsiangkao at linux.alibaba.com
Wed Jan 26 14:37:26 AEDT 2022


Otherwise, when --extract is specified, it will report:
<W> erofs: erofsfsck_set_attributes() Line[189] failed to set times: (null)
<W> erofs: erofsfsck_set_attributes() Line[197] failed to set permissions: (null)
...

Fixes: 412c8f908132 ("erofs-utils: fsck: add --extract=X support to extract to path X")
Signed-off-by: Gao Xiang <hsiangkao at linux.alibaba.com>
---
 fsck/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fsck/main.c b/fsck/main.c
index f2af609..92e0c76 100644
--- a/fsck/main.c
+++ b/fsck/main.c
@@ -665,7 +665,7 @@ verify:
 		ret = erofs_iterate_dir(&ctx, true);
 	}
 
-	if (!ret)
+	if (!ret && fsckcfg.extract_path)
 		erofsfsck_set_attributes(&inode, fsckcfg.extract_path);
 
 out:
-- 
2.24.4



More information about the Linux-erofs mailing list