]> git.proxmox.com Git - mirror_ubuntu-kernels.git/blobdiff - include/linux/sysfs.h
Merge tag 'powerpc-5.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[mirror_ubuntu-kernels.git] / include / linux / sysfs.h
index 7462315a643b3251f853905d3f7885cdc227a4b2..fd0fcb4d4f4d99743440711354937d09ffde7a58 100644 (file)
@@ -314,6 +314,18 @@ static inline void sysfs_enable_ns(struct kernfs_node *kn)
        return kernfs_enable_ns(kn);
 }
 
+int sysfs_file_change_owner(struct kobject *kobj, const char *name, kuid_t kuid,
+                           kgid_t kgid);
+int sysfs_change_owner(struct kobject *kobj, kuid_t kuid, kgid_t kgid);
+int sysfs_link_change_owner(struct kobject *kobj, struct kobject *targ,
+                           const char *name, kuid_t kuid, kgid_t kgid);
+int sysfs_groups_change_owner(struct kobject *kobj,
+                             const struct attribute_group **groups,
+                             kuid_t kuid, kgid_t kgid);
+int sysfs_group_change_owner(struct kobject *kobj,
+                            const struct attribute_group *groups, kuid_t kuid,
+                            kgid_t kgid);
+
 #else /* CONFIG_SYSFS */
 
 static inline int sysfs_create_dir_ns(struct kobject *kobj, const void *ns)
@@ -534,6 +546,40 @@ static inline void sysfs_enable_ns(struct kernfs_node *kn)
 {
 }
 
+static inline int sysfs_file_change_owner(struct kobject *kobj,
+                                         const char *name, kuid_t kuid,
+                                         kgid_t kgid)
+{
+       return 0;
+}
+
+static inline int sysfs_link_change_owner(struct kobject *kobj,
+                                         struct kobject *targ,
+                                         const char *name, kuid_t kuid,
+                                         kgid_t kgid)
+{
+       return 0;
+}
+
+static inline int sysfs_change_owner(struct kobject *kobj, kuid_t kuid, kgid_t kgid)
+{
+       return 0;
+}
+
+static inline int sysfs_groups_change_owner(struct kobject *kobj,
+                         const struct attribute_group **groups,
+                         kuid_t kuid, kgid_t kgid)
+{
+       return 0;
+}
+
+static inline int sysfs_group_change_owner(struct kobject *kobj,
+                                          const struct attribute_group *groups,
+                                          kuid_t kuid, kgid_t kgid)
+{
+       return 0;
+}
+
 #endif /* CONFIG_SYSFS */
 
 static inline int __must_check sysfs_create_file(struct kobject *kobj,