]> git.baikalelectronics.ru Git - kernel.git/commit
block: don't look at the struct device dev_t in disk_devt
authorChristoph Hellwig <hch@lst.de>
Thu, 2 Nov 2017 18:29:52 +0000 (21:29 +0300)
committerJens Axboe <axboe@kernel.dk>
Fri, 3 Nov 2017 16:31:48 +0000 (10:31 -0600)
commitf7ab9e139a150a94973f0cae530f3a743dc85d67
treecbe0e6bc91a51781ae4d3ac60af5e7abae54a37b
parente74680da3ea821623fd28a6920ecaa12a762a2ef
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>
block/genhd.c
include/linux/genhd.h