mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
Use bdev_is_paritition() instead of open-coding it
Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -966,7 +966,7 @@ char *bdev_name(char *buf, char *end, struct block_device *bdev,
|
||||
|
||||
hd = bdev->bd_disk;
|
||||
buf = string(buf, end, hd->disk_name, spec);
|
||||
if (bdev->bd_partno) {
|
||||
if (bdev_is_partition(bdev)) {
|
||||
if (isdigit(hd->disk_name[strlen(hd->disk_name)-1])) {
|
||||
if (buf < end)
|
||||
*buf = 'p';
|
||||
|
||||
Reference in New Issue
Block a user