[PATCH v3] erofs-utils: lib: correctly set {u,g}id in erofs_make_empty_root_inode()

Gao Xiang hsiangkao at linux.alibaba.com
Wed Jan 14 19:46:38 AEDT 2026



On 2026/1/14 16:35, Yifan Zhao wrote:
> In rebuild mode, the {u,g}id of the root inode is currently defaulted
> to 0 and is not controlled by --force_{u,g}id. This behavior also causes
> the {u,g}id of intermediate dir inodes created by
> `erofs_rebuild_mkdir()` to be set to 0.
> 
> This patch fixes the behavior by explicitly setting permissions for the
> root inode:
> 
> - If --force-{u,g}id is not specified, it now defaults to the current
>     user's {u,g}id.
> - If --force-{u,g}id is specified, it correctly updates the ownership
>     for all files and directories.
> 
> Signed-off-by: Yifan Zhao <zhaoyifan28 at huawei.com>

Applied now.


More information about the Linux-erofs mailing list