[PATCH] erofs-utils: lib: fix btype for the data tails of directories
Gao Xiang
hsiangkao at linux.alibaba.com
Wed Dec 25 18:04:54 AEDT 2024
It should be DIRA instead of DATA for directories.
Signed-off-by: Gao Xiang <hsiangkao at linux.alibaba.com>
---
lib/inode.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/inode.c b/lib/inode.c
index de6d020..7ee5d78 100644
--- a/lib/inode.c
+++ b/lib/inode.c
@@ -870,7 +870,8 @@ static int erofs_write_tail_end(struct erofs_inode *inode)
erofs_off_t pos, zero_pos;
if (!bh) {
- bh = erofs_balloc(sbi->bmgr, DATA,
+ bh = erofs_balloc(sbi->bmgr,
+ S_ISDIR(inode->i_mode) ? DIRA: DATA,
erofs_blksiz(sbi), 0);
if (IS_ERR(bh))
return PTR_ERR(bh);
--
2.43.5
More information about the Linux-erofs
mailing list