[PATCH 01/13] erofs-utils: fix overriding of i_rdev for special device

Gao Xiang hsiangkao at linux.alibaba.com
Mon Aug 14 15:42:15 AEST 2023



On 2023/8/14 11:42, Jingbo Xu wrote:
> In index mode for tarerofs, tarerofs_write_chunk_indexes() is still called
> even for files with 0 i_size, and inode->u.chunkformat is initialized
> accordingly.  This will make the previously set inode->u.i_rdev be
> overridden as u.chunkformat and u.i_rdev are reused in one union.
> 
> To tidy up the code of writing file, extract two helpers writing file in
> index and non-index mode.  Also fix the missing erofs_iput() when
> tarerofs_write_chunkes() fails.
> 
> Fixes: 95d315fd7958 ("erofs-utils: introduce tarerofs")
> Signed-off-by: Jingbo Xu <jefflexu at linux.alibaba.com>

Reviewed-by: Gao Xiang <hsiangkao at linux.alibaba.com>

Thanks,
Gao Xiang


More information about the Linux-erofs mailing list