projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57ba105
)
block: use bd_partno in bdevname
author
Christoph Hellwig
<hch@lst.de>
Thu, 3 Sep 2020 05:41:03 +0000
(07:41 +0200)
committer
Jens Axboe
<axboe@kernel.dk>
Fri, 25 Sep 2020 14:18:58 +0000
(08:18 -0600)
No need to go through the hd_struct to find the partition number.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/genhd.c
patch
|
blob
|
history
diff --git
a/block/genhd.c
b/block/genhd.c
index 05fb27cbb667842a3e40ce4c9a2f456645a27c44..e5f17f022ec7005cc63bdb40fd59c583a74ef4cc 100644
(file)
--- a/
block/genhd.c
+++ b/
block/genhd.c
@@
-85,7
+85,7
@@
char *disk_name(struct gendisk *hd, int partno, char *buf)
const char *bdevname(struct block_device *bdev, char *buf)
{
- return disk_name(bdev->bd_disk, bdev->bd_part
->part
no, buf);
+ return disk_name(bdev->bd_disk, bdev->bd_partno, buf);
}
EXPORT_SYMBOL(bdevname);