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)
commit868957ce051ed0743a975133d4ca2dc23c4bb0ed
treeebe85d5298d71865ff7ac2ddb4d6d4292b5a28bd
parent54401564be6d752b22f68ec7aedb1450724d79d1
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