summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/jump_label.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/jump_label.c b/kernel/jump_label.c
index a8ce45097f3d..e6f1f24ad577 100644
--- a/kernel/jump_label.c
+++ b/kernel/jump_label.c
@@ -66,8 +66,9 @@ void jump_label_inc(struct jump_label_key *key)
return;
jump_label_lock();
- if (atomic_add_return(1, &key->enabled) == 1)
+ if (atomic_read(&key->enabled) == 0)
jump_label_update(key, JUMP_LABEL_ENABLE);
+ atomic_inc(&key->enabled);
jump_label_unlock();
}