Lines Matching refs:l_old
804 static int check_flags(struct bpf_htab *htab, struct htab_elem *l_old, in check_flags() argument
807 if (l_old && (map_flags & ~BPF_F_LOCK) == BPF_NOEXIST) in check_flags()
811 if (!l_old && (map_flags & ~BPF_F_LOCK) == BPF_EXIST) in check_flags()
823 struct htab_elem *l_new = NULL, *l_old; in htab_map_update_elem() local
847 l_old = lookup_nulls_elem_raw(head, hash, key, key_size, in htab_map_update_elem()
849 ret = check_flags(htab, l_old, map_flags); in htab_map_update_elem()
852 if (l_old) { in htab_map_update_elem()
855 l_old->key + round_up(key_size, 8), in htab_map_update_elem()
868 l_old = lookup_elem_raw(head, hash, key, key_size); in htab_map_update_elem()
870 ret = check_flags(htab, l_old, map_flags); in htab_map_update_elem()
874 if (unlikely(l_old && (map_flags & BPF_F_LOCK))) { in htab_map_update_elem()
882 l_old->key + round_up(key_size, 8), in htab_map_update_elem()
889 l_old); in htab_map_update_elem()
900 if (l_old) { in htab_map_update_elem()
901 hlist_nulls_del_rcu(&l_old->hash_node); in htab_map_update_elem()
903 free_htab_elem(htab, l_old); in htab_map_update_elem()
915 struct htab_elem *l_new, *l_old = NULL; in htab_lru_map_update_elem() local
948 l_old = lookup_elem_raw(head, hash, key, key_size); in htab_lru_map_update_elem()
950 ret = check_flags(htab, l_old, map_flags); in htab_lru_map_update_elem()
958 if (l_old) { in htab_lru_map_update_elem()
960 hlist_nulls_del_rcu(&l_old->hash_node); in htab_lru_map_update_elem()
969 else if (l_old) in htab_lru_map_update_elem()
970 bpf_lru_push_free(&htab->lru, &l_old->lru_node); in htab_lru_map_update_elem()
980 struct htab_elem *l_new = NULL, *l_old; in __htab_percpu_map_update_elem() local
1003 l_old = lookup_elem_raw(head, hash, key, key_size); in __htab_percpu_map_update_elem()
1005 ret = check_flags(htab, l_old, map_flags); in __htab_percpu_map_update_elem()
1009 if (l_old) { in __htab_percpu_map_update_elem()
1011 pcpu_copy_value(htab, htab_elem_get_ptr(l_old, key_size), in __htab_percpu_map_update_elem()
1033 struct htab_elem *l_new = NULL, *l_old; in __htab_lru_percpu_map_update_elem() local
1067 l_old = lookup_elem_raw(head, hash, key, key_size); in __htab_lru_percpu_map_update_elem()
1069 ret = check_flags(htab, l_old, map_flags); in __htab_lru_percpu_map_update_elem()
1073 if (l_old) { in __htab_lru_percpu_map_update_elem()
1074 bpf_lru_node_set_ref(&l_old->lru_node); in __htab_lru_percpu_map_update_elem()
1077 pcpu_copy_value(htab, htab_elem_get_ptr(l_old, key_size), in __htab_lru_percpu_map_update_elem()