Thread (12 messages) 12 messages, 2 authors, 2019-08-21
STALE2526d REVIEWED: 1 (0M)
Revisions (4)
  1. v1 [diff vs current]
  2. v3 [diff vs current]
  3. v4 [diff vs current]
  4. v5 current

[PATCH V5 2/9] blk-zoned: update blkdev_nr_zones() with helper

From: Chaitanya Kulkarni <hidden>
Date: 2019-08-21 06:14:55
Also in: linux-bcache, linux-scsi, xen-devel
Subsystem: block layer, the rest, zoned block device (block layer) · Maintainers: Jens Axboe, Linus Torvalds, Damien Le Moal

This patch updates the blkdev_nr_zones() with newly introduced helper
function to read the nr_sects from block device's hd_parts with the
help if part_nr_sects_read().

Reviewed-by: Minwoo Im <redacted>
Signed-off-by: Chaitanya Kulkarni <redacted>
---
 block/blk-zoned.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-zoned.c b/block/blk-zoned.c
index 4bc5f260248a..3f5e9bf03486 100644
--- a/block/blk-zoned.c
+++ b/block/blk-zoned.c
@@ -93,7 +93,7 @@ unsigned int blkdev_nr_zones(struct block_device *bdev)
 	if (!blk_queue_is_zoned(q))
 		return 0;
 
-	return __blkdev_nr_zones(q, bdev->bd_part->nr_sects);
+	return __blkdev_nr_zones(q, bdev_nr_sects(bdev));
 }
 EXPORT_SYMBOL_GPL(blkdev_nr_zones);
 
-- 
2.17.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help