]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
sysfs: remove exports of sysfs_*change_owner()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Feb 2026 13:09:42 +0000 (14:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Feb 2026 15:49:38 +0000 (16:49 +0100)
Both sysfs_change_owner() and sysfs_file_change_owner() are exported to
modules, but there are no in-kernel module users, so remove the exports
so that crazy out-of-tree drivers don't get the impression that it is
safe to call these functions at all.

Reviewed-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
Reviewed-by: Danilo Krummrich <dakr@kernel.org>
Reported-by: Lee Jones <lee@kernel.org>
Reviewed-by: Lee Jones <lee@kernel.org>
Link: https://patch.msgid.link/2026020541-energize-graduate-981a@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/sysfs/file.c

index 3825e780cc580df4a1a511d12b3ee3fa2e6bdb37..a8176c875f55e707da5927d619cfbde235937e09 100644 (file)
@@ -689,7 +689,6 @@ int sysfs_file_change_owner(struct kobject *kobj, const char *name, kuid_t kuid,
 
        return error;
 }
-EXPORT_SYMBOL_GPL(sysfs_file_change_owner);
 
 /**
  *     sysfs_change_owner - change owner of the given object.
@@ -736,7 +735,6 @@ int sysfs_change_owner(struct kobject *kobj, kuid_t kuid, kgid_t kgid)
 
        return 0;
 }
-EXPORT_SYMBOL_GPL(sysfs_change_owner);
 
 /**
  *     sysfs_emit - scnprintf equivalent, aware of PAGE_SIZE buffer.