[Devel] [PATCH RHEL7 COMMIT] ve sysfs: export sysfs_perms_set helper

Konstantin Khorenko khorenko at virtuozzo.com
Wed Jul 12 12:23:29 MSK 2017


The commit is pushed to "branch-rh7-3.10.0-514.26.1.vz7.33.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.26.1.vz7.33.4
------>
commit f871a8cca29fad3e1b2849d54b3f47e1393695bf
Author: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
Date:   Wed Jul 12 13:23:29 2017 +0400

    ve sysfs: export sysfs_perms_set helper
    
    It's going to be used to expose modules sysfs dentries
    
    Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
 fs/sysfs/ve.c         | 2 +-
 include/linux/sysfs.h | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/fs/sysfs/ve.c b/fs/sysfs/ve.c
index d7eff88..4c6f9ce 100644
--- a/fs/sysfs/ve.c
+++ b/fs/sysfs/ve.c
@@ -128,7 +128,7 @@ static int sysfs_perms_show(struct seq_file *m, void *v)
 	return 0;
 }
 
-static int sysfs_perms_set(char *path, struct ve_struct *ve, int mask)
+int sysfs_perms_set(char *path, struct ve_struct *ve, int mask)
 {
 	struct sysfs_dirent *sd = &sysfs_root;
 	struct kmapset_map *map = NULL;
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index a8118bc..81a9ae8 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -254,6 +254,11 @@ void sysfs_put(struct sysfs_dirent *sd);
 
 int __must_check sysfs_init(void);
 
+#ifdef CONFIG_VE
+struct ve_struct;
+int sysfs_perms_set(char *path, struct ve_struct *ve, int mask);
+#endif
+
 #else /* CONFIG_SYSFS */
 
 static inline int sysfs_schedule_callback(struct kobject *kobj,


More information about the Devel mailing list