diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-07-17 19:44:05 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-07-17 19:44:05 +0300 |
commit | c02c0232f4b5a7b775c4819ec2d707bd6a696eee (patch) | |
tree | 45086e82a271619e08fbaeacf1372eba189d933e /include/drm/spsc_queue.h | |
parent | 81bd6aab35ad9ecce95dfe3e33c807effe370d83 (diff) | |
parent | e8af141440cebccb6554fc23f8d21ce063b976a1 (diff) | |
download | linux-rolling-stable.tar.xz |
Merge v6.15.7linux-rolling-stable
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/drm/spsc_queue.h')
-rw-r--r-- | include/drm/spsc_queue.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/drm/spsc_queue.h b/include/drm/spsc_queue.h index 125f096c88cb..ee9df8cc67b7 100644 --- a/include/drm/spsc_queue.h +++ b/include/drm/spsc_queue.h @@ -70,9 +70,11 @@ static inline bool spsc_queue_push(struct spsc_queue *queue, struct spsc_node *n preempt_disable(); + atomic_inc(&queue->job_count); + smp_mb__after_atomic(); + tail = (struct spsc_node **)atomic_long_xchg(&queue->tail, (long)&node->next); WRITE_ONCE(*tail, node); - atomic_inc(&queue->job_count); /* * In case of first element verify new node will be visible to the consumer |