Ver Fonte

core: cleanup task boost list

Cleanup entries in the task boost list when the pid becomes inactive.

Change-Id: I0b1b2ef81cda470cd08b31ab4e78f81d346b9b70
Acked-by: Ryan Chapman <[email protected]>
Signed-off-by: Subash Abhinov Kasiviswanathan <[email protected]>
Subash Abhinov Kasiviswanathan há 5 anos atrás
pai
commit
6c318682bc
1 ficheiros alterados com 3 adições e 6 exclusões
  1. 3 6
      core/rmnet_genl.c

+ 3 - 6
core/rmnet_genl.c

@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
-/* Copyright (c) 2019, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
  *
  * RMNET Data Generic Netlink
  *
@@ -190,11 +190,8 @@ static void rmnet_create_pid_bps_resp(struct rmnet_core_pid_bps_resp
 			tx_bytes_cur = node_p->tx_bytes;
 			if (tx_bytes_cur <= node_p->tx_bytes_last_query) {
 				/* Dont send inactive pids to userspace */
-				/* TODO: can remove from hash table probably */
-				node_p->tx_bps = 0;
-				node_p->timstamp_last_query =
-					pid_bps_resp_ptr->timestamp;
-				node_p->sched_boost_remaining_ms = 0;
+				hash_del(&node_p->list);
+				kfree(node_p);
 				continue;
 			}