[PATCH v3 03/11] erofs-utils: lib: fix dirent type of whiteout in tarerofs

Jingbo Xu jefflexu at linux.alibaba.com
Tue Aug 22 19:24:49 AEST 2023


Set the correct dirent type for whiteout.

Fixes: 95d315fd7958 ("erofs-utils: introduce tarerofs")
Signed-off-by: Jingbo Xu <jefflexu at linux.alibaba.com>
---
 lib/tar.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/tar.c b/lib/tar.c
index 42590d2..328ab98 100644
--- a/lib/tar.c
+++ b/lib/tar.c
@@ -694,6 +694,7 @@ new_inode:
 	if (whout) {
 		inode->i_mode = (inode->i_mode & ~S_IFMT) | S_IFCHR;
 		inode->u.i_rdev = EROFS_WHITEOUT_DEV;
+		d->type = EROFS_FT_CHRDEV;
 	} else {
 		inode->i_mode = st.st_mode;
 		if (S_ISBLK(st.st_mode) || S_ISCHR(st.st_mode))
-- 
2.19.1.6.gb485710b



More information about the Linux-erofs mailing list