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 <[email protected]> Fixes: 8b465fe ("erofs: support flattened block device for multi-blob images") Reviewed-by: Jia Zhu <[email protected]> Reviewed-by: Gao Xiang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Gao Xiang <[email protected]>
1 parent 75a5221 commit f939aee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)