[RESEND PATCH] erofs: relax the constraint of non-empty device tag in flatdev mode

Jingbo Xu jefflexu at linux.alibaba.com
Fri Sep 15 18:27:28 AEST 2023


The device tag is not required in flatdev mode, and thus relax this
constraint in flatdev mode.

Signed-off-by: Jingbo Xu <jefflexu at linux.alibaba.com>
---
Sorry I forget to cc linux-erofs at lists.ozlabs.org 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;
-- 
2.19.1.6.gb485710b



More information about the Linux-erofs mailing list