public inbox for linux-erofs@ozlabs.org
 help / color / mirror / Atom feed
* [PATCH] erofs-utils: lib: relax erofs_write_device_table() device table check
@ 2026-02-12  0:13 Jonathan Calmels
  2026-02-12  9:13 ` Gao Xiang
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jonathan Calmels @ 2026-02-12  0:13 UTC (permalink / raw)
  To: linux-erofs, xiang, jcalmels; +Cc: Gao Xiang, Jonathan Calmels

Avoid returning an error in erofs_write_device_table()
if a new device slot table hasn't been allocated.
Rationale is to allow erofs_importer_flush_all() to succeed when
dealing with images with pre-existing device slots.

Signed-off-by: Jonathan Calmels <jcalmels@nvidia.com>
---
 lib/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/super.c b/lib/super.c
index a203f96..d38396f 100644
--- a/lib/super.c
+++ b/lib/super.c
@@ -392,7 +392,7 @@ int erofs_write_device_table(struct erofs_sb_info *sbi)
 	if (!sbi->extra_devices)
 		goto out;
 	if (!bh)
-		return -EINVAL;
+		goto out;
 
 	pos = erofs_btell(bh, false);
 	if (pos == EROFS_NULL_ADDR) {
-- 
2.53.0



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

end of thread, other threads:[~2026-02-13  1:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-12  0:13 [PATCH] erofs-utils: lib: relax erofs_write_device_table() device table check Jonathan Calmels
2026-02-12  9:13 ` Gao Xiang
2026-02-12 17:00   ` Jonathan Calmels
2026-02-12 17:21     ` Gao Xiang
2026-02-12 18:33 ` [PATCH v2] " Jonathan Calmels
2026-02-13  1:13 ` [PATCH v3] " Jonathan Calmels

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