bpf: Add bpf_local_storage_free()
authorMartin KaFai Lau <martin.lau@kernel.org>
Wed, 8 Mar 2023 06:59:30 +0000 (22:59 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 10 Mar 2023 19:05:29 +0000 (11:05 -0800)
commit7e30a8477b0bdd13dfd0b24e4f32b26d22b96e6c
tree1ba97166ccbcc9b294f4b53c810e8d54a519861b
parent1288aaa2786b1e58c9e88e53f7654d520ebe0f3b
bpf: Add bpf_local_storage_free()

This patch refactors local_storage freeing logic into
bpf_local_storage_free(). It is a preparation work for a later
patch that uses bpf_mem_cache_alloc/free. The other kfree(local_storage)
cases are also changed to bpf_local_storage_free(..., reuse_now = true).

Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://lore.kernel.org/r/20230308065936.1550103-12-martin.lau@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/bpf_local_storage.c