Linux-EROFS Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH] erofs: relax the constraint of non-empty device tag in flatdev mode
@ 2023-09-15  8:27 Jingbo Xu
  2023-09-15  8:55 ` [External] " Jia Zhu via Linux-erofs
  2023-09-15  9:14 ` Gao Xiang
  0 siblings, 2 replies; 3+ messages in thread
From: Jingbo Xu @ 2023-09-15  8:27 UTC (permalink / raw)
  To: xiang, chao, linux-erofs; +Cc: huyue2

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

Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
---
Sorry I forget to cc linux-erofs@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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-15  9:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-15  8:27 [RESEND PATCH] erofs: relax the constraint of non-empty device tag in flatdev mode Jingbo Xu
2023-09-15  8:55 ` [External] " Jia Zhu via Linux-erofs
2023-09-15  9:14 ` Gao Xiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox