diff options
author | Christoph Hellwig <hch@lst.de> | 2017-11-02 21:29:52 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-11-03 19:31:48 +0300 |
commit | 517bf3c306bad4fe0da631f90ae2ec40924dee2b (patch) | |
tree | cbe0e6bc91a51781ae4d3ac60af5e7abae54a37b /include | |
parent | ef71de8b15d891b27b8c983a9a8972b11cb4576a (diff) | |
download | linux-517bf3c306bad4fe0da631f90ae2ec40924dee2b.tar.xz |
block: don't look at the struct device dev_t in disk_devt
The hidden gendisks introduced in the next patch need to keep the dev
field in their struct device empty so that udev won't try to create
block device nodes for them. To support that rewrite disk_devt to
look at the major and first_minor fields in the gendisk itself instead
of looking into the struct device.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/genhd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index ea652bfcd675..5c0ed5db33c2 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -234,7 +234,7 @@ static inline bool disk_part_scan_enabled(struct gendisk *disk) static inline dev_t disk_devt(struct gendisk *disk) { - return disk_to_dev(disk)->devt; + return MKDEV(disk->major, disk->first_minor); } static inline dev_t part_devt(struct hd_struct *part) |