Lines Matching refs:l_old
940 static int check_flags(struct bpf_htab *htab, struct htab_elem *l_old, in check_flags() argument
943 if (l_old && (map_flags & ~BPF_F_LOCK) == BPF_NOEXIST) in check_flags()
947 if (!l_old && (map_flags & ~BPF_F_LOCK) == BPF_EXIST) in check_flags()
959 struct htab_elem *l_new = NULL, *l_old; in htab_map_update_elem() local
983 l_old = lookup_nulls_elem_raw(head, hash, key, key_size, in htab_map_update_elem()
985 ret = check_flags(htab, l_old, map_flags); in htab_map_update_elem()
988 if (l_old) { in htab_map_update_elem()
991 l_old->key + round_up(key_size, 8), in htab_map_update_elem()
1003 l_old = lookup_elem_raw(head, hash, key, key_size); in htab_map_update_elem()
1005 ret = check_flags(htab, l_old, map_flags); in htab_map_update_elem()
1009 if (unlikely(l_old && (map_flags & BPF_F_LOCK))) { in htab_map_update_elem()
1017 l_old->key + round_up(key_size, 8), in htab_map_update_elem()
1024 l_old); in htab_map_update_elem()
1035 if (l_old) { in htab_map_update_elem()
1036 hlist_nulls_del_rcu(&l_old->hash_node); in htab_map_update_elem()
1038 free_htab_elem(htab, l_old); in htab_map_update_elem()
1050 struct htab_elem *l_new, *l_old = NULL; in htab_lru_map_update_elem() local
1082 l_old = lookup_elem_raw(head, hash, key, key_size); in htab_lru_map_update_elem()
1084 ret = check_flags(htab, l_old, map_flags); in htab_lru_map_update_elem()
1092 if (l_old) { in htab_lru_map_update_elem()
1094 hlist_nulls_del_rcu(&l_old->hash_node); in htab_lru_map_update_elem()
1103 else if (l_old) in htab_lru_map_update_elem()
1104 bpf_lru_push_free(&htab->lru, &l_old->lru_node); in htab_lru_map_update_elem()
1114 struct htab_elem *l_new = NULL, *l_old; in __htab_percpu_map_update_elem() local
1136 l_old = lookup_elem_raw(head, hash, key, key_size); in __htab_percpu_map_update_elem()
1138 ret = check_flags(htab, l_old, map_flags); in __htab_percpu_map_update_elem()
1142 if (l_old) { in __htab_percpu_map_update_elem()
1144 pcpu_copy_value(htab, htab_elem_get_ptr(l_old, key_size), in __htab_percpu_map_update_elem()
1166 struct htab_elem *l_new = NULL, *l_old; in __htab_lru_percpu_map_update_elem() local
1199 l_old = lookup_elem_raw(head, hash, key, key_size); in __htab_lru_percpu_map_update_elem()
1201 ret = check_flags(htab, l_old, map_flags); in __htab_lru_percpu_map_update_elem()
1205 if (l_old) { in __htab_lru_percpu_map_update_elem()
1206 bpf_lru_node_set_ref(&l_old->lru_node); in __htab_lru_percpu_map_update_elem()
1209 pcpu_copy_value(htab, htab_elem_get_ptr(l_old, key_size), in __htab_lru_percpu_map_update_elem()