summaryrefslogtreecommitdiffstats
path: root/kernel/cgroup/cgroup-internal.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2019-01-05 06:38:03 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2019-02-28 09:29:29 +0100
commit90129625d9203a917fc1d3e4768976ba90d71b44 (patch)
tree297cd4933c7fb8a450bfcd30c6649882a64cff97 /kernel/cgroup/cgroup-internal.h
parentipc: Convert mqueue fs to fs_context (diff)
downloadlinux-90129625d9203a917fc1d3e4768976ba90d71b44.tar.xz
linux-90129625d9203a917fc1d3e4768976ba90d71b44.zip
cgroup: start switching to fs_context
Unfortunately, cgroup is tangled into kernfs infrastructure. To avoid converting all kernfs-based filesystems at once, we need to untangle the remount part of things, instead of having it go through kernfs_sop_remount_fs(). Fortunately, it's not hard to do. This commit just gets cgroup/cgroup1 to use fs_context to deliver options on mount and remount paths. Parsing those is going to be done in the next commits; for now we do pretty much what legacy case does. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/cgroup/cgroup-internal.h')
-rw-r--r--kernel/cgroup/cgroup-internal.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/kernel/cgroup/cgroup-internal.h b/kernel/cgroup/cgroup-internal.h
index c9a35f09e4b9..a89cb0ba7a68 100644
--- a/kernel/cgroup/cgroup-internal.h
+++ b/kernel/cgroup/cgroup-internal.h
@@ -7,6 +7,7 @@
#include <linux/workqueue.h>
#include <linux/list.h>
#include <linux/refcount.h>
+#include <linux/fs_context.h>
#define TRACE_CGROUP_PATH_LEN 1024
extern spinlock_t trace_cgroup_path_lock;
@@ -37,6 +38,18 @@ extern void __init enable_debug_cgroup(void);
} while (0)
/*
+ * The cgroup filesystem superblock creation/mount context.
+ */
+struct cgroup_fs_context {
+ char *data;
+};
+
+static inline struct cgroup_fs_context *cgroup_fc2context(struct fs_context *fc)
+{
+ return fc->fs_private;
+}
+
+/*
* A cgroup can be associated with multiple css_sets as different tasks may
* belong to different cgroups on different hierarchies. In the other
* direction, a css_set is naturally associated with multiple cgroups.
@@ -255,5 +268,6 @@ void cgroup1_check_for_release(struct cgroup *cgrp);
struct dentry *cgroup1_mount(struct file_system_type *fs_type, int flags,
void *data, unsigned long magic,
struct cgroup_namespace *ns);
+int cgroup1_reconfigure(struct fs_context *ctx);
#endif /* __CGROUP_INTERNAL_H */