inet: Cleanup on charging memory for newly accepted sockets
authorAbel Wu <wuyun.abel@bytedance.com>
Tue, 20 Jun 2023 09:27:11 +0000 (17:27 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 22 Jun 2023 00:37:42 +0000 (17:37 -0700)
commit53bf91641ae19fe51fb24422de6d07565a3536d0
tree4d0e57f20af9d98ec27e8629fa88105b02d26fe6
parentca4fa87435370747cac535cecfd08672bb679487
inet: Cleanup on charging memory for newly accepted sockets

If there is no net-memcg associated with the sock, don't bother
calculating its memory usage for charge.

Signed-off-by: Abel Wu <wuyun.abel@bytedance.com>
Link: https://lore.kernel.org/r/20230620092712.16217-1-wuyun.abel@bytedance.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/inet_connection_sock.c