[RH7,09/32] Revert "ms/ns: allow ns_entries to have custom symlink content"

Submitted by Pavel Tikhomirov on June 8, 2020, 5:05 p.m.

Details

Message ID 20200608170602.308872-10-ptikhomirov@virtuozzo.com
State New
Series "port nsfs from vz8"
Headers show

Commit Message

Pavel Tikhomirov June 8, 2020, 5:05 p.m.
This reverts commit 2b151c3f890947af0f9ad091cfc00e74cfdfcdce.

We switch from procfs ns-files to nsfs ones, so we will apply nsfs
version of the patch instead.

https://jira.sw.ru/browse/PSBM-102357

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
---
 fs/proc/namespaces.c    | 4 +---
 include/linux/proc_ns.h | 1 -
 2 files changed, 1 insertion(+), 4 deletions(-)

Patch hide | download patch | download mbox

diff --git a/fs/proc/namespaces.c b/fs/proc/namespaces.c
index 6976ef6cb193..86aff3a43db2 100644
--- a/fs/proc/namespaces.c
+++ b/fs/proc/namespaces.c
@@ -150,7 +150,6 @@  static int proc_ns_readlink(struct dentry *dentry, char __user *buffer, int bufl
 	struct proc_inode *ei = PROC_I(inode);
 	const struct proc_ns_operations *ns_ops = ei->ns.ns_ops;
 	struct task_struct *task;
-	const char *link_name;
 	void *ns;
 	char name[50];
 	int len = -EACCES;
@@ -167,8 +166,7 @@  static int proc_ns_readlink(struct dentry *dentry, char __user *buffer, int bufl
 	if (!ns)
 		goto out_put_task;
 
-	link_name = ns_ops->real_ns_name ? : ns_ops->name;
-	snprintf(name, sizeof(name), "%s:[%u]", link_name, ns_ops->inum(ns));
+	snprintf(name, sizeof(name), "%s:[%u]", ns_ops->name, ns_ops->inum(ns));
 	len = strlen(name);
 
 	if (len > buflen)
diff --git a/include/linux/proc_ns.h b/include/linux/proc_ns.h
index b8dc2bca2575..5478e144c50a 100644
--- a/include/linux/proc_ns.h
+++ b/include/linux/proc_ns.h
@@ -10,7 +10,6 @@  struct nsproxy;
 
 struct proc_ns_operations {
 	const char *name;
-	const char *real_ns_name;
 	int type;
 	void *(*get)(struct task_struct *task);
 	void (*put)(void *ns);