From f10886297e77091b7bc313766cf7c8bac97d4291 Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Wed, 26 May 2021 17:28:18 +0300 Subject: libdiskfs, libnetfs: Disable broken code This logic is obviously broken, let's disable it for now. --- libdiskfs/dead-name.c | 7 ++++++- libnetfs/dead-name.c | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libdiskfs/dead-name.c b/libdiskfs/dead-name.c index 6ca208e4..5e0cf787 100644 --- a/libdiskfs/dead-name.c +++ b/libdiskfs/dead-name.c @@ -23,10 +23,14 @@ void ports_dead_name (void *notify, mach_port_t dead_name) { +#if 0 + /* FIXME: This makes no sense, the dead name could be np->sockaddr, but not + the protid; it's pointless to look it up this way. It also leaks a + reference. */ struct protid *pi = ports_lookup_port (diskfs_port_bucket, dead_name, diskfs_protid_class); struct node *np; - + if (pi) { np = pi->po->np; @@ -40,6 +44,7 @@ ports_dead_name (void *notify, mach_port_t dead_name) else pthread_mutex_unlock (&np->lock); } +#endif fshelp_remove_active_translator (dead_name); diff --git a/libnetfs/dead-name.c b/libnetfs/dead-name.c index 6f2d78d6..f34ddbf7 100644 --- a/libnetfs/dead-name.c +++ b/libnetfs/dead-name.c @@ -23,6 +23,10 @@ void ports_dead_name (void *notify, mach_port_t dead_name) { +#if 0 + /* FIXME: This makes no sense, the dead name could be np->sockaddr, but not + the protid; it's pointless to look it up this way. It also leaks a + reference. */ struct protid *pi = ports_lookup_port (netfs_port_bucket, dead_name, netfs_protid_class); struct node *np; @@ -40,6 +44,7 @@ ports_dead_name (void *notify, mach_port_t dead_name) else pthread_mutex_unlock (&np->lock); } +#endif fshelp_remove_active_translator (dead_name); -- cgit v1.2.3