]> git.baikalelectronics.ru Git - kernel.git/commit
sysfs: add sysfs_link_change_owner()
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 27 Feb 2020 03:37:12 +0000 (04:37 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Feb 2020 04:07:25 +0000 (20:07 -0800)
commit5fd55f0030a3d1e306c5c583e5f20c6bd5c14d0a
tree777513bd25867a6d981901eb0987fb90fcdd68ee
parent1f86b5907d0cc2c08915ccec69067bc8b9eddf55
sysfs: add sysfs_link_change_owner()

Add a helper to change the owner of a sysfs link.
This function will be used to correctly account for kobject 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>
fs/sysfs/file.c
include/linux/sysfs.h