Lines Matching refs:map_fd
318 int map_fd, err; in bperf_lock_attr_map() local
328 map_fd = bpf_map_create(BPF_MAP_TYPE_HASH, NULL, in bperf_lock_attr_map()
332 if (map_fd < 0) in bperf_lock_attr_map()
335 err = bpf_obj_pin(map_fd, path); in bperf_lock_attr_map()
338 close(map_fd); in bperf_lock_attr_map()
339 map_fd = bpf_obj_get(path); in bperf_lock_attr_map()
340 if (map_fd < 0) in bperf_lock_attr_map()
344 map_fd = bpf_obj_get(path); in bperf_lock_attr_map()
345 if (map_fd < 0) in bperf_lock_attr_map()
349 if (!bperf_attr_map_compatible(map_fd)) { in bperf_lock_attr_map()
350 close(map_fd); in bperf_lock_attr_map()
354 err = flock(map_fd, LOCK_EX); in bperf_lock_attr_map()
356 close(map_fd); in bperf_lock_attr_map()
359 return map_fd; in bperf_lock_attr_map()