Skip to contentSkip to conversation

null_blk: fix a bug in capacity calculation

PATCH Applied Shaohua Li 2 participants 2 messages Oct 11, 2013 Block layer

lore
Share & tools
lore

Shaohua Li

author
#0 lore raw

PATCH 1/1 null_blk: fix a bug in capacity calculation

the capacity calculation is obvious buggy.

---
 drivers/block/null_blk.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/null_blk.c +1 -1
Index: master/drivers/block/null_blk.c
===================================================================
@@ -555,7 +555,7 @@ err:
 	blk_queue_physical_block_size(nullb->q, bs);
 
 	size = gb * 1024 * 1024 * 1024ULL;
-	size = sector_div(size, bs);
+	sector_div(size, bs);
 	set_capacity(disk, size);
 
 	disk->flags |= GENHD_FL_EXT_DEVT;
maintainer Applied
#1 lore raw
Quoted 1 line · Shaohua Li

the capacity calculation is obvious buggy.

Thanks, applied.

Signature · 1 line
Jens Axboe