From patchwork Tue May 10 20:44:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Serge E. Hallyn" X-Patchwork-Id: 620820 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3r4B7h2950z9sf6; Wed, 11 May 2016 06:44:32 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1b0EW5-0001Sg-09; Tue, 10 May 2016 20:44:29 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1b0EVy-0001RG-7j for kernel-team@lists.ubuntu.com; Tue, 10 May 2016 20:44:22 +0000 Received: from h2.hallyn.com ([78.46.35.8] helo=ubuntumail) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1b0EVx-0004AU-RA for kernel-team@lists.ubuntu.com; Tue, 10 May 2016 20:44:21 +0000 Date: Tue, 10 May 2016 20:44:19 +0000 From: Serge Hallyn To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/3] Revert "UBUNTU: SAUCE: (noup) cgroup namespaces: add a 'nsroot=' mountinfo field" Message-ID: <20160510204419.GB19753@ubuntumail> References: <20160510204326.GA19680@ubuntumail> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160510204326.GA19680@ubuntumail> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com This reverts commit d5e333e38ae8db3c355dee0a3d49c362df250420. --- fs/kernfs/mount.c | 2 +- include/linux/kernfs.h | 3 +-- kernel/cgroup.c | 29 +---------------------------- 3 files changed, 3 insertions(+), 31 deletions(-) diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c index 6d178f2..ac44f27 100644 --- a/fs/kernfs/mount.c +++ b/fs/kernfs/mount.c @@ -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; } diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h index d8bb68f..307e1a6 100644 --- a/include/linux/kernfs.h +++ b/include/linux/kernfs.h @@ -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); diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 8a4408f..a50b707 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -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; }