summaryrefslogtreecommitdiffstats
path: root/kernel/locking/spinlock.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-12-19 12:37:24 +0100
committerDave Airlie <airlied@redhat.com>2017-12-19 12:37:24 +0100
commit6b7dcb536e3535444c39286333f10d06d2f44fb5 (patch)
tree6a4c1e30e5900626e506d46b100d21a2fcd59003 /kernel/locking/spinlock.c
parentMerge tag 'drm-misc-next-2017-12-14' of git://anongit.freedesktop.org/drm/drm... (diff)
parentLinux 4.15-rc4 (diff)
downloadlinux-6b7dcb536e3535444c39286333f10d06d2f44fb5.tar.xz
linux-6b7dcb536e3535444c39286333f10d06d2f44fb5.zip
BackMerge tag 'v4.15-rc4' into drm-next
Linux 4.15-rc4 Daniel requested it to fix some messy conflicts.
Diffstat (limited to 'kernel/locking/spinlock.c')
-rw-r--r--kernel/locking/spinlock.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/kernel/locking/spinlock.c b/kernel/locking/spinlock.c
index 1fd1a7543cdd..936f3d14dd6b 100644
--- a/kernel/locking/spinlock.c
+++ b/kernel/locking/spinlock.c
@@ -66,12 +66,8 @@ void __lockfunc __raw_##op##_lock(locktype##_t *lock) \
break; \
preempt_enable(); \
\
- if (!(lock)->break_lock) \
- (lock)->break_lock = 1; \
- while ((lock)->break_lock) \
- arch_##op##_relax(&lock->raw_lock); \
+ arch_##op##_relax(&lock->raw_lock); \
} \
- (lock)->break_lock = 0; \
} \
\
unsigned long __lockfunc __raw_##op##_lock_irqsave(locktype##_t *lock) \
@@ -86,12 +82,9 @@ unsigned long __lockfunc __raw_##op##_lock_irqsave(locktype##_t *lock) \
local_irq_restore(flags); \
preempt_enable(); \
\
- if (!(lock)->break_lock) \
- (lock)->break_lock = 1; \
- while ((lock)->break_lock) \
- arch_##op##_relax(&lock->raw_lock); \
+ arch_##op##_relax(&lock->raw_lock); \
} \
- (lock)->break_lock = 0; \
+ \
return flags; \
} \
\