summaryrefslogtreecommitdiffstats
path: root/arch/s390/lib/spinlock.c
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2014-05-16 09:35:02 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2014-05-20 08:58:54 +0200
commit939c5ae4029e1679bb93f7d09afb8c831db985bd (patch)
treeec977875b12965b54a340ac938b07501ec1ed8c4 /arch/s390/lib/spinlock.c
parentbae8f567344a7cb6a23ca6e13096ba785c69eb42 (diff)
downloadlinux-939c5ae4029e1679bb93f7d09afb8c831db985bd.tar.gz
linux-939c5ae4029e1679bb93f7d09afb8c831db985bd.tar.bz2
linux-939c5ae4029e1679bb93f7d09afb8c831db985bd.zip
s390/rwlock: add missing local_irq_restore calls
The out of line _raw_read_lock_wait_flags/_raw_write_lock_wait_flags functions for the arch_read_lock_flags/arch_write_lock_flags calls fail to re-enable the interrupts after another unsuccessful try to get the lock with compare-and-swap. The following wait would be done with interrupts disabled which is suboptimal. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/lib/spinlock.c')
-rw-r--r--arch/s390/lib/spinlock.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/lib/spinlock.c b/arch/s390/lib/spinlock.c
index 284d879a9b8c..1dd282c742b5 100644
--- a/arch/s390/lib/spinlock.c
+++ b/arch/s390/lib/spinlock.c
@@ -143,6 +143,7 @@ void _raw_read_lock_wait_flags(arch_rwlock_t *rw, unsigned long flags)
local_irq_disable();
if (_raw_compare_and_swap(&rw->lock, old, old + 1))
return;
+ local_irq_restore(flags);
}
}
EXPORT_SYMBOL(_raw_read_lock_wait_flags);
@@ -199,6 +200,7 @@ void _raw_write_lock_wait_flags(arch_rwlock_t *rw, unsigned long flags)
local_irq_disable();
if (_raw_compare_and_swap(&rw->lock, 0, 0x80000000))
return;
+ local_irq_restore(flags);
}
}
EXPORT_SYMBOL(_raw_write_lock_wait_flags);