diff options
| author | Dave Airlie <[email protected]> | 2021-06-23 00:07:48 +0000 |
|---|---|---|
| committer | Dave Airlie <[email protected]> | 2021-06-23 00:07:48 +0000 |
| commit | f45fbbb6d5cff29ddfc708676ec1c2496eed3a07 (patch) | |
| tree | 5496fee9f6b10da368aa49b03612061156e42d2f /lib/percpu-refcount.c | |
| parent | Merge tag 'amd-drm-next-5.14-2021-06-16' of https://gitlab.freedesktop.org/ag... (diff) | |
| parent | Linux 5.13-rc7 (diff) | |
| download | kernel-f45fbbb6d5cff29ddfc708676ec1c2496eed3a07.tar.gz kernel-f45fbbb6d5cff29ddfc708676ec1c2496eed3a07.zip | |
Backmerge tag 'v5.13-rc7' into drm-next
Backmerge Linux 5.13-rc7 to make some pulls from later bases apply,
and to bake in the conflicts so far.
Diffstat (limited to 'lib/percpu-refcount.c')
| -rw-r--r-- | lib/percpu-refcount.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/percpu-refcount.c b/lib/percpu-refcount.c index a1071cdefb5a..af9302141bcf 100644 --- a/lib/percpu-refcount.c +++ b/lib/percpu-refcount.c @@ -275,7 +275,7 @@ static void __percpu_ref_switch_mode(struct percpu_ref *ref, wait_event_lock_irq(percpu_ref_switch_waitq, !data->confirm_switch, percpu_ref_switch_lock); - if (data->force_atomic || (ref->percpu_count_ptr & __PERCPU_REF_DEAD)) + if (data->force_atomic || percpu_ref_is_dying(ref)) __percpu_ref_switch_to_atomic(ref, confirm_switch); else __percpu_ref_switch_to_percpu(ref); @@ -385,7 +385,7 @@ void percpu_ref_kill_and_confirm(struct percpu_ref *ref, spin_lock_irqsave(&percpu_ref_switch_lock, flags); - WARN_ONCE(ref->percpu_count_ptr & __PERCPU_REF_DEAD, + WARN_ONCE(percpu_ref_is_dying(ref), "%s called more than once on %ps!", __func__, ref->data->release); @@ -465,7 +465,7 @@ void percpu_ref_resurrect(struct percpu_ref *ref) spin_lock_irqsave(&percpu_ref_switch_lock, flags); - WARN_ON_ONCE(!(ref->percpu_count_ptr & __PERCPU_REF_DEAD)); + WARN_ON_ONCE(!percpu_ref_is_dying(ref)); WARN_ON_ONCE(__ref_is_percpu(ref, &percpu_count)); ref->percpu_count_ptr &= ~__PERCPU_REF_DEAD; |
