block: genhd: add 'groups' argument to device_add_disk
Update device_add_disk() to take an 'groups' argument so that individual drivers can register a device with additional sysfs attributes. This avoids race condition the driver would otherwise have if these groups were to be created with sysfs_add_groups(). Signed-off-by: Martin Wilck <martin.wilck@suse.com> Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Šī revīzija ir iekļauta:

revīziju iesūtīja
Jens Axboe

vecāks
6c3b7af1c9
revīzija
fef912bf86
@@ -2698,7 +2698,7 @@ static int mmc_add_disk(struct mmc_blk_data *md)
|
||||
int ret;
|
||||
struct mmc_card *card = md->queue.card;
|
||||
|
||||
device_add_disk(md->parent, md->disk);
|
||||
device_add_disk(md->parent, md->disk, NULL);
|
||||
md->force_ro.show = force_ro_show;
|
||||
md->force_ro.store = force_ro_store;
|
||||
sysfs_attr_init(&md->force_ro.attr);
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user