diff options
author | Leonardo Bras <leobras@redhat.com> | 2024-01-15 17:19:34 -0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-15 15:52:12 -0500 |
commit | 5f4c01f1e3c7b0c8d1e5dd6f080531de7aa5e47b (patch) | |
tree | aa7ee45b2dcda6cfd770d117dec30ace0f7ded27 /init | |
parent | 1e2f2d31997a9496f99e2b43255d6a48b06fbcc2 (diff) |
spinlock: Fix failing build for PREEMPT_RT
Since 1d71b30e1f85 ("sched.h: Move (spin|rwlock)_needbreak() to
spinlock.h") build fails for PREEMPT_RT, since there is no definition
available of either spin_needbreak() and rwlock_needbreak().
Since it was moved on the mentioned commit, it was placed inside a
!PREEMPT_RT part of the code, making it out of reach for an RT kernel.
Fix this by moving code it a few lines down so it can be reached by an
RT build, where it can also make use of the *_is_contended() definition
added by the spinlock_rt.h.
Fixes: d1d71b30e1f85 ("sched.h: Move (spin|rwlock)_needbreak() to
spinlock.h")
Signed-off-by: Leonardo Bras <leobras@redhat.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Acked-by: Waiman Long <longman@redhat.com>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions