summaryrefslogtreecommitdiff
path: root/include/linux/bpf_local_storage.h
diff options
context:
space:
mode:
authorMartin KaFai Lau <martin.lau@kernel.org>2023-03-08 09:59:21 +0300
committerAlexei Starovoitov <ast@kernel.org>2023-03-10 22:05:28 +0300
commit2ffcb6fc50174d1efc8f98633eb2647d84483c68 (patch)
tree2fe829723048d435cd02f816209afb366e5e4b7c /include/linux/bpf_local_storage.h
parent4cbd23cc92c49173e402753cab62b8a7754ed18f (diff)
downloadlinux-2ffcb6fc50174d1efc8f98633eb2647d84483c68.tar.xz
bpf: Refactor codes into bpf_local_storage_destroy
This patch first renames bpf_local_storage_unlink_nolock to bpf_local_storage_destroy(). It better reflects that it is only used when the storage's owner (sk/task/cgrp/inode) is being kfree(). All bpf_local_storage_destroy's caller is taking the spin lock and then free the storage. This patch also moves these two steps into the bpf_local_storage_destroy. This is a preparation work for a later patch that uses bpf_mem_cache_alloc/free in the bpf_local_storage. Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Link: https://lore.kernel.org/r/20230308065936.1550103-3-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/linux/bpf_local_storage.h')
-rw-r--r--include/linux/bpf_local_storage.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/bpf_local_storage.h b/include/linux/bpf_local_storage.h
index 502ad7093f13..5908a954ddc2 100644
--- a/include/linux/bpf_local_storage.h
+++ b/include/linux/bpf_local_storage.h
@@ -128,7 +128,7 @@ bpf_local_storage_lookup(struct bpf_local_storage *local_storage,
struct bpf_local_storage_map *smap,
bool cacheit_lockit);
-bool bpf_local_storage_unlink_nolock(struct bpf_local_storage *local_storage);
+void bpf_local_storage_destroy(struct bpf_local_storage *local_storage);
void bpf_local_storage_map_free(struct bpf_map *map,
struct bpf_local_storage_cache *cache,