You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
committed by
Jens Axboe
parent
ef71de8b15
commit
517bf3c306
@@ -649,10 +649,6 @@ void device_add_disk(struct device *parent, struct gendisk *disk)
|
||||
return;
|
||||
}
|
||||
disk_to_dev(disk)->devt = devt;
|
||||
|
||||
/* ->major and ->first_minor aren't supposed to be
|
||||
* dereferenced from here on, but set them just in case.
|
||||
*/
|
||||
disk->major = MAJOR(devt);
|
||||
disk->first_minor = MINOR(devt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user