All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Calmels <jcalmels@nvidia.com>
To: linux-erofs@lists.ozlabs.org, xiang@kernel.org, jcalmels@nvidia.com
Cc: Gao Xiang <xiang@kernel.org>, Jonathan Calmels <jcalmels@nvidia.com>
Subject: [PATCH] erofs-utils: lib: relax erofs_write_device_table() device table check
Date: Wed, 11 Feb 2026 16:13:35 -0800	[thread overview]
Message-ID: <20260212001302.72193-2-jcalmels@nvidia.com> (raw)

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



             reply	other threads:[~2026-02-12  0:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-12  0:13 Jonathan Calmels [this message]
2026-02-12  9:13 ` [PATCH] erofs-utils: lib: relax erofs_write_device_table() device table check 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260212001302.72193-2-jcalmels@nvidia.com \
    --to=jcalmels@nvidia.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=xiang@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.