Merge branches 'work.misc' and 'work.dcache' of git://git.kernel.org/pub/scm/linux...
[sfrench/cifs-2.6.git] / kernel / bpf / syscall.c
index a31a1ba0f8eada88e03dc4a73ad9c0305cc70198..b41c6cf2eb883ee208c87a2edce9853c00aa5b84 100644 (file)
@@ -575,7 +575,7 @@ static struct bpf_map *bpf_map_inc_not_zero(struct bpf_map *map,
 {
        int refold;
 
-       refold = __atomic_add_unless(&map->refcnt, 1, 0);
+       refold = atomic_fetch_add_unless(&map->refcnt, 1, 0);
 
        if (refold >= BPF_MAX_REFCNT) {
                __bpf_map_put(map, false);
@@ -1144,7 +1144,7 @@ struct bpf_prog *bpf_prog_inc_not_zero(struct bpf_prog *prog)
 {
        int refold;
 
-       refold = __atomic_add_unless(&prog->aux->refcnt, 1, 0);
+       refold = atomic_fetch_add_unless(&prog->aux->refcnt, 1, 0);
 
        if (refold >= BPF_MAX_REFCNT) {
                __bpf_prog_put(prog, false);