From dea0166543995e5fccf41b50d344cd87afc29fe9 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Mon, 28 Feb 2022 10:09:23 -0500 Subject: [PATCH] Revert "NFSv4: use unique client identifiers in network namespaces" This reverts commit 5605639692829eefbb014e2e6025243110f0b4e4. The functionality is believed to be capable of causing regressions in existing setups, so the author has requested that it be reverted. Signed-off-by: Trond Myklebust --- fs/nfs/sysfs.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/fs/nfs/sysfs.c b/fs/nfs/sysfs.c index 886ed1eec2e59..a6f7403669631 100644 --- a/fs/nfs/sysfs.c +++ b/fs/nfs/sysfs.c @@ -151,18 +151,6 @@ static struct kobj_type nfs_netns_client_type = { .namespace = nfs_netns_client_namespace, }; -static void assign_unique_clientid(struct nfs_netns_client *clp) -{ - unsigned char client_uuid[16]; - char *uuid_str = kmalloc(UUID_STRING_LEN + 1, GFP_KERNEL); - - if (uuid_str) { - generate_random_uuid(client_uuid); - sprintf(uuid_str, "%pU", client_uuid); - rcu_assign_pointer(clp->identifier, uuid_str); - } -} - static struct nfs_netns_client *nfs_netns_client_alloc(struct kobject *parent, struct net *net) { @@ -170,8 +158,6 @@ static struct nfs_netns_client *nfs_netns_client_alloc(struct kobject *parent, p = kzalloc(sizeof(*p), GFP_KERNEL); if (p) { - if (net != &init_net) - assign_unique_clientid(p); p->net = net; p->kobject.kset = nfs_client_kset; if (kobject_init_and_add(&p->kobject, &nfs_netns_client_type, -- 2.39.5