diff options
Diffstat (limited to 'kernel/bpf/syscall.c')
-rw-r--r-- | kernel/bpf/syscall.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index 35dc466641f2..f12db70d3bf3 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c | |||
@@ -575,7 +575,7 @@ static struct bpf_map *bpf_map_inc_not_zero(struct bpf_map *map, | |||
575 | { | 575 | { |
576 | int refold; | 576 | int refold; |
577 | 577 | ||
578 | refold = __atomic_add_unless(&map->refcnt, 1, 0); | 578 | refold = atomic_fetch_add_unless(&map->refcnt, 1, 0); |
579 | 579 | ||
580 | if (refold >= BPF_MAX_REFCNT) { | 580 | if (refold >= BPF_MAX_REFCNT) { |
581 | __bpf_map_put(map, false); | 581 | __bpf_map_put(map, false); |
@@ -1142,7 +1142,7 @@ struct bpf_prog *bpf_prog_inc_not_zero(struct bpf_prog *prog) | |||
1142 | { | 1142 | { |
1143 | int refold; | 1143 | int refold; |
1144 | 1144 | ||
1145 | refold = __atomic_add_unless(&prog->aux->refcnt, 1, 0); | 1145 | refold = atomic_fetch_add_unless(&prog->aux->refcnt, 1, 0); |
1146 | 1146 | ||
1147 | if (refold >= BPF_MAX_REFCNT) { | 1147 | if (refold >= BPF_MAX_REFCNT) { |
1148 | __bpf_prog_put(prog, false); | 1148 | __bpf_prog_put(prog, false); |