device: add device_change_owner()
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 27 Feb 2020 03:37:15 +0000 (04:37 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Feb 2020 04:07:25 +0000 (20:07 -0800)
commitb8f33e5d76a7a1b87e0cc760d05bf2477b4e91d6
treeebe85d5298d71865ff7ac2ddb4d6d4292b5a28bd
parent2c4f9401ceb00167a3bfd322a28aa87b646a253f
device: add device_change_owner()

Add a helper to change the owner of a device's sysfs entries. This
needs to happen when the ownership of a device is changed, e.g. when
moving network devices between network namespaces.
This function will be used to correctly account for ownership changes,
e.g. when moving network devices between network namespaces.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/base/core.c
include/linux/device.h