Re: [PATCH 2/5] block: genhd: add device_add_disk_with_groups

Christoph Hellwig
2018-07-25T07:46:13Z

On Wed, Jul 25, 2018 at 08:28:37AM +0200, Hannes Reinecke wrote:
> 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 need to be created with sysfs_add_groups().
>
> Signed-off-by: Martin Wilck <martin.wilck@suse.com>
> Signed-off-by: Hannes Reinecke <hare@suse.com>

This should be From: Martin, shouldn't it?

My feedback last time was that I'd rather see the new groups argument
to device_add_disk instead of introducing yet another add_disk variant.

I still think that would be the better way to go.