Commit 8a63a86e authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

block: use bd_partno in bdevname

No need to go through the hd_struct to find the partition number.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 57ba1059
...@@ -85,7 +85,7 @@ char *disk_name(struct gendisk *hd, int partno, char *buf) ...@@ -85,7 +85,7 @@ char *disk_name(struct gendisk *hd, int partno, char *buf)
const char *bdevname(struct block_device *bdev, char *buf) const char *bdevname(struct block_device *bdev, char *buf)
{ {
return disk_name(bdev->bd_disk, bdev->bd_part->partno, buf); return disk_name(bdev->bd_disk, bdev->bd_partno, buf);
} }
EXPORT_SYMBOL(bdevname); EXPORT_SYMBOL(bdevname);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment