在 2023/9/15 16:27, Jingbo Xu 写道:
The device tag is not required in flatdev mode, and thus relax this
constraint in flatdev mode.
Signed-off-by: Jingbo Xu <[email protected]>
LGTM
Reviewed-by: Jia Zhu <[email protected]>
---
Sorry I forget to cc [email protected] in the former patch.
---
fs/erofs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;