Commit f939aeea authored by Jingbo Xu's avatar Jingbo Xu Committed by Gao Xiang

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: default avatarJingbo Xu <jefflexu@linux.alibaba.com>
Fixes: 8b465fec ("erofs: support flattened block device for multi-blob images")
Reviewed-by: default avatarJia Zhu <zhujia.zj@bytedance.com>
Reviewed-by: default avatarGao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230915082728.56588-1-jefflexu@linux.alibaba.comSigned-off-by: default avatarGao Xiang <hsiangkao@linux.alibaba.com>
parent 75a52216
......@@ -235,7 +235,7 @@ static int erofs_init_device(struct erofs_buf *buf, struct super_block *sb,
return PTR_ERR(ptr);
dis = ptr + erofs_blkoff(sb, *pos);
if (!dif->path) {
if (!sbi->devs->flatdev && !dif->path) {
if (!dis->tag[0]) {
erofs_err(sb, "empty device tag @ pos %llu", *pos);
return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment