bpf: Move a few bpf_local_storage functions to static scope
[platform/kernel/linux-starfive.git] / include / linux / bpf_local_storage.h
index 0fe9298..502ad70 100644 (file)
@@ -74,12 +74,6 @@ struct bpf_local_storage_elem {
        struct hlist_node snode;        /* Linked to bpf_local_storage */
        struct bpf_local_storage __rcu *local_storage;
        struct rcu_head rcu;
-       bool can_use_smap; /* Is it safe to access smap in bpf_selem_free_* RCU
-                           * callbacks? bpf_local_storage_map_free only
-                           * executes rcu_barrier when there are special
-                           * fields, this field remembers that to ensure we
-                           * don't access already freed smap in sdata.
-                           */
        /* 8 bytes hole */
        /* The data is stored in another cacheline to minimize
         * the number of cachelines access during a cache hit.
@@ -153,8 +147,6 @@ void bpf_selem_unlink(struct bpf_local_storage_elem *selem, bool use_trace_rcu);
 void bpf_selem_link_map(struct bpf_local_storage_map *smap,
                        struct bpf_local_storage_elem *selem);
 
-void bpf_selem_unlink_map(struct bpf_local_storage_elem *selem);
-
 struct bpf_local_storage_elem *
 bpf_selem_alloc(struct bpf_local_storage_map *smap, void *owner, void *value,
                bool charge_mem, gfp_t gfp_flags);
@@ -169,6 +161,6 @@ struct bpf_local_storage_data *
 bpf_local_storage_update(void *owner, struct bpf_local_storage_map *smap,
                         void *value, u64 map_flags, gfp_t gfp_flags);
 
-void bpf_local_storage_free_rcu(struct rcu_head *rcu);
+u64 bpf_local_storage_map_mem_usage(const struct bpf_map *map);
 
 #endif /* _BPF_LOCAL_STORAGE_H */