Lines Matching refs:l_old
1056 static int check_flags(struct bpf_htab *htab, struct htab_elem *l_old, in check_flags() argument
1059 if (l_old && (map_flags & ~BPF_F_LOCK) == BPF_NOEXIST) in check_flags()
1063 if (!l_old && (map_flags & ~BPF_F_LOCK) == BPF_EXIST) in check_flags()
1075 struct htab_elem *l_new = NULL, *l_old; in htab_map_update_elem() local
1101 l_old = lookup_nulls_elem_raw(head, hash, key, key_size, in htab_map_update_elem()
1103 ret = check_flags(htab, l_old, map_flags); in htab_map_update_elem()
1106 if (l_old) { in htab_map_update_elem()
1109 l_old->key + round_up(key_size, 8), in htab_map_update_elem()
1123 l_old = lookup_elem_raw(head, hash, key, key_size); in htab_map_update_elem()
1125 ret = check_flags(htab, l_old, map_flags); in htab_map_update_elem()
1129 if (unlikely(l_old && (map_flags & BPF_F_LOCK))) { in htab_map_update_elem()
1137 l_old->key + round_up(key_size, 8), in htab_map_update_elem()
1144 l_old); in htab_map_update_elem()
1155 if (l_old) { in htab_map_update_elem()
1156 hlist_nulls_del_rcu(&l_old->hash_node); in htab_map_update_elem()
1166 old_map_ptr = fd_htab_map_get_ptr(map, l_old); in htab_map_update_elem()
1167 check_and_free_fields(htab, l_old); in htab_map_update_elem()
1171 if (l_old) { in htab_map_update_elem()
1175 free_htab_elem(htab, l_old); in htab_map_update_elem()
1194 struct htab_elem *l_new, *l_old = NULL; in htab_lru_map_update_elem() local
1230 l_old = lookup_elem_raw(head, hash, key, key_size); in htab_lru_map_update_elem()
1232 ret = check_flags(htab, l_old, map_flags); in htab_lru_map_update_elem()
1240 if (l_old) { in htab_lru_map_update_elem()
1242 hlist_nulls_del_rcu(&l_old->hash_node); in htab_lru_map_update_elem()
1252 else if (l_old) in htab_lru_map_update_elem()
1253 htab_lru_push_free(htab, l_old); in htab_lru_map_update_elem()
1263 struct htab_elem *l_new = NULL, *l_old; in __htab_percpu_map_update_elem() local
1288 l_old = lookup_elem_raw(head, hash, key, key_size); in __htab_percpu_map_update_elem()
1290 ret = check_flags(htab, l_old, map_flags); in __htab_percpu_map_update_elem()
1294 if (l_old) { in __htab_percpu_map_update_elem()
1296 pcpu_copy_value(htab, htab_elem_get_ptr(l_old, key_size), in __htab_percpu_map_update_elem()
1318 struct htab_elem *l_new = NULL, *l_old; in __htab_lru_percpu_map_update_elem() local
1354 l_old = lookup_elem_raw(head, hash, key, key_size); in __htab_lru_percpu_map_update_elem()
1356 ret = check_flags(htab, l_old, map_flags); in __htab_lru_percpu_map_update_elem()
1360 if (l_old) { in __htab_lru_percpu_map_update_elem()
1361 bpf_lru_node_set_ref(&l_old->lru_node); in __htab_lru_percpu_map_update_elem()
1364 pcpu_copy_value(htab, htab_elem_get_ptr(l_old, key_size), in __htab_lru_percpu_map_update_elem()