Skip to content

Commit f939aee

Browse files
lostjefflehsiangkao
authored andcommitted
erofs: allow empty device tags in flatdev mode
Device tags aren't actually required in flatdev mode, thus fix mount failure due to empty device tags in flatdev mode. Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com> Fixes: 8b465fe ("erofs: support flattened block device for multi-blob images") Reviewed-by: Jia Zhu <zhujia.zj@bytedance.com> Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20230915082728.56588-1-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
1 parent 75a5221 commit f939aee

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/erofs/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ static int erofs_init_device(struct erofs_buf *buf, struct super_block *sb,
235235
return PTR_ERR(ptr);
236236
dis = ptr + erofs_blkoff(sb, *pos);
237237

238-
if (!dif->path) {
238+
if (!sbi->devs->flatdev && !dif->path) {
239239
if (!dis->tag[0]) {
240240
erofs_err(sb, "empty device tag @ pos %llu", *pos);
241241
return -EINVAL;

0 commit comments

Comments
 (0)