kobject: make kset_get_ownership() 'static'

This change “kobject: make kset_get_ownership() ‘static'” in Linux kernel is authored by Eric Biggers <ebiggers [at] google.com> on Tue Jan 8 23:36:14 2019 -0800.

kobject: make kset_get_ownership() 'static'

kset_get_ownership() is only used in lib/kobject.c, so make it 'static'.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

This Linux change may have been applied to various maintained Linux releases and you can find Linux releases including commit 7ab35a1.

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 lib/kobject.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/kobject.c b/lib/kobject.c
index b72e00f..aa89edc 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -887,7 +887,7 @@ static void kset_release(struct kobject *kobj)
-void kset_get_ownership(struct kobject *kobj, kuid_t *uid, kgid_t *gid)
+static void kset_get_ownership(struct kobject *kobj, kuid_t *uid, kgid_t *gid)
 	if (kobj->parent)
 		kobject_get_ownership(kobj->parent, uid, gid);

The commit for this change in Linux stable tree is 7ab35a1 (patch).

Leave a Reply

Your email address will not be published. Required fields are marked *