Linux block layer
 help / color / mirror / Atom feed
* [PATCH] zloop: fix block size query
@ 2026-11-02  5:55 Christoph Hellwig
  2026-11-03  4:57 ` Damien Le Moal
  2026-11-03 14:31 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2026-11-02  5:55 UTC (permalink / raw)
  To: dlemoal, axboe; +Cc: linux-block

The block size obviously needs to be queried when it is not set, not when
it already is set.

Reported: Damien Le Moal <dlemoal@kernel.org>
Fixes: 5e9929e2f03c ("zloop: share more code for opening a zone backing file")
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/block/zloop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/zloop.c b/drivers/block/zloop.c
index 65634a39b0bf..5cfbb5a6b771 100644
--- a/drivers/block/zloop.c
+++ b/drivers/block/zloop.c
@@ -1137,7 +1137,7 @@ static int zloop_init_zone(struct zloop_device *zlo, struct zloop_options *opts,
 		goto out_fput;
 	}
 
-	if (zlo->block_size) {
+	if (!zlo->block_size) {
 		ret = zloop_get_block_size(zlo, zone);
 		if (ret)
 			goto out_fput;
-- 
2.53.0


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

end of thread, other threads:[~2026-11-03 14:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-02  5:55 [PATCH] zloop: fix block size query Christoph Hellwig
2026-11-03  4:57 ` Damien Le Moal
2026-11-03 14:31 ` Jens Axboe

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