Commit 60b509b2 authored by Kamal Mostafa's avatar Kamal Mostafa

Revert "UBUNTU: SAUCE: (noup) cgroup namespaces: add a 'nsroot=' mountinfo field"

BugLink: http://bugs.launchpad.net/bugs/1584163

This reverts commit d5e333e3.

Cc: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent ce2f449a
......@@ -36,7 +36,7 @@ static int kernfs_sop_show_options(struct seq_file *sf, struct dentry *dentry)
struct kernfs_syscall_ops *scops = root->syscall_ops;
if (scops && scops->show_options)
return scops->show_options(sf, dentry, root);
return scops->show_options(sf, root);
return 0;
}
......
......@@ -145,8 +145,7 @@ struct kernfs_node {
*/
struct kernfs_syscall_ops {
int (*remount_fs)(struct kernfs_root *root, int *flags, char *data);
int (*show_options)(struct seq_file *sf, struct dentry *dentry,
struct kernfs_root *root);
int (*show_options)(struct seq_file *sf, struct kernfs_root *root);
int (*mkdir)(struct kernfs_node *parent, const char *name,
umode_t mode);
......
......@@ -1589,32 +1589,7 @@ static int rebind_subsystems(struct cgroup_root *dst_root,
return 0;
}
static void cgroup_show_nsroot(struct seq_file *seq, struct dentry *dentry,
struct kernfs_root *kf_root)
{
struct kernfs_node *d_kn = dentry->d_fsdata;
char *nsroot;
int len, ret;
if (!kf_root)
return;
len = kernfs_path_from_node(d_kn, kf_root->kn, NULL, 0);
if (len <= 0)
return;
nsroot = kzalloc(len + 1, GFP_ATOMIC);
if (!nsroot)
return;
ret = kernfs_path_from_node(d_kn, kf_root->kn, nsroot, len + 1);
if (ret <= 0 || ret > len)
goto out;
seq_show_option(seq, "nsroot", nsroot);
out:
kfree(nsroot);
}
static int cgroup_show_options(struct seq_file *seq, struct dentry *dentry,
static int cgroup_show_options(struct seq_file *seq,
struct kernfs_root *kf_root)
{
struct cgroup_root *root = cgroup_root_from_kf(kf_root);
......@@ -1640,8 +1615,6 @@ static int cgroup_show_options(struct seq_file *seq, struct dentry *dentry,
seq_puts(seq, ",clone_children");
if (strlen(root->name))
seq_show_option(seq, "name", root->name);
cgroup_show_nsroot(seq, dentry, kf_root);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment