summaryrefslogtreecommitdiff
path: root/fs/erofs
diff options
context:
space:
mode:
authorJingbo Xu <jefflexu@linux.alibaba.com>2023-09-15 16:27:28 +0800
committerGao Xiang <hsiangkao@linux.alibaba.com>2023-09-19 08:39:02 +0800
commitf939aeea7ab7d96cd321e7ac107f5a070836b66f (patch)
tree3b7222cf58e06b01a7f78139515bca7ec6f6e40e /fs/erofs
parent75a5221630fe5aa3fedba7a06be618db0f79ba1e (diff)
downloadlwn-f939aeea7ab7d96cd321e7ac107f5a070836b66f.tar.gz
lwn-f939aeea7ab7d96cd321e7ac107f5a070836b66f.zip
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: 8b465fecc35a ("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>
Diffstat (limited to 'fs/erofs')
-rw-r--r--fs/erofs/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/erofs/super.c b/fs/erofs/super.c
index 44a24d573f1f..3700af9ee173 100644
--- a/fs/erofs/super.c
+++ b/fs/erofs/super.c
@@ -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;