From: Gao Xiang Date: Wed, 25 Dec 2024 07:04:54 +0000 (+0800) Subject: erofs-utils: lib: fix btype for the data tails of directories X-Git-Tag: accepted/tizen/unified/20250610.081809~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a5b9a61e453b8602444a60ce7b531a053ee70cab;p=platform%2Fupstream%2Ferofs-utils.git erofs-utils: lib: fix btype for the data tails of directories It should be DIRA instead of DATA for directories. Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20241225070454.750271-1-hsiangkao@linux.alibaba.com --- diff --git a/lib/inode.c b/lib/inode.c index c4edd43..91ff4ce 100644 --- a/lib/inode.c +++ b/lib/inode.c @@ -850,7 +850,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, 0); if (IS_ERR(bh)) return PTR_ERR(bh);