diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 79c35a5b276..726588bc180 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -420,18 +420,6 @@ out_rcu_unlock:
 	goto out;
 }
 
-/* START_OF_KNOX_NPA */
-/** The function is used to check if the ncm feature is enabled or not;
- * if enabled then collect the socket meta-data information;
- * if enabled then it calls knox_collect_socket_data function in ncm.c to record all the socket data; **/
-static void knox_collect_metadata(struct socket *sock)
-{
-	if (check_ncm_flag()) {
-		knox_collect_socket_data(sock);
-	}
-}
-/* END_OF_KNOX_NPA */
-
 /*
  *	The peer socket should always be NULL (or else). When we call this
  *	function we are destroying the object and from then on nobody
@@ -463,9 +451,6 @@ int inet_release(struct socket *sock)
 		if (sock_flag(sk, SOCK_LINGER) &&
 		    !(current->flags & PF_EXITING))
 			timeout = sk->sk_lingertime;
-		/* START_OF_KNOX_NPA */
-		knox_collect_metadata(sock);
-		/* END_OF_KNOX_NPA */
 		sock->sk = NULL;
 		sk->sk_prot->close(sk, timeout);
 	}
