Skip to contentSkip to conversation

zloop: fix block size query

PATCH Applied Christoph Hellwig 3 participants 3 messages Nov 2 – Nov 3

Subsystems (2)
lore
Share & tools
lore

Christoph Hellwig

author reviewer
#0 lore raw

PATCH 1/1 zloop: fix block size query

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

Reported: Damien Le Moal <[email protected]>

Fixes 5e9929e2f03c ("zloop: share more code for opening a zone backing file")
---
 drivers/block/zloop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/zloop.c +1 -1
index 65634a39b0bf..5cfbb5a6b771 100644
@@ -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;
Signature · 1 line
2.53.0
maintainer Applied
#2 lore raw
In reply to Christoph Hellwig
Quoted 2 lines · Christoph Hellwig

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

Applied, thanks!

[1/1] zloop: fix block size query

      commit: 8fbee85a90789d367c347b1cfd5a5ef37f3a934a

Best regards,

Signature · 1 line
Jens Axboe