[Devel,1/2] ve sysfs: export sysfs_perms_set helper

Submitted by Stanislav Kinsburskiy on July 11, 2017, 3:29 p.m.

Details

Message ID 20170711152916.6646.31090.stgit@localhost.localdomain
State New
Series "module: expose sysfs dentries in container"
Headers show

Commit Message

Stanislav Kinsburskiy July 11, 2017, 3:29 p.m.
It's going to be used to expose modules sysfs dentries

Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
---
 fs/sysfs/ve.c         |    2 +-
 include/linux/sysfs.h |    5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

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,