Lines Matching refs:old_sdata
247 static int check_flags(const struct bpf_local_storage_data *old_sdata, in check_flags() argument
250 if (old_sdata && (map_flags & ~BPF_F_LOCK) == BPF_NOEXIST) in check_flags()
254 if (!old_sdata && (map_flags & ~BPF_F_LOCK) == BPF_EXIST) in check_flags()
332 struct bpf_local_storage_data *old_sdata = NULL; in bpf_local_storage_update() local
371 old_sdata = in bpf_local_storage_update()
373 err = check_flags(old_sdata, map_flags); in bpf_local_storage_update()
376 if (old_sdata && selem_linked_to_storage(SELEM(old_sdata))) { in bpf_local_storage_update()
377 copy_map_value_locked(&smap->map, old_sdata->data, in bpf_local_storage_update()
379 return old_sdata; in bpf_local_storage_update()
396 old_sdata = bpf_local_storage_lookup(local_storage, smap, false); in bpf_local_storage_update()
397 err = check_flags(old_sdata, map_flags); in bpf_local_storage_update()
401 if (old_sdata && (map_flags & BPF_F_LOCK)) { in bpf_local_storage_update()
402 copy_map_value_locked(&smap->map, old_sdata->data, value, in bpf_local_storage_update()
404 selem = SELEM(old_sdata); in bpf_local_storage_update()
417 selem = bpf_selem_alloc(smap, owner, value, !old_sdata); in bpf_local_storage_update()
430 if (old_sdata) { in bpf_local_storage_update()
431 bpf_selem_unlink_map(SELEM(old_sdata)); in bpf_local_storage_update()
432 bpf_selem_unlink_storage_nolock(local_storage, SELEM(old_sdata), in bpf_local_storage_update()