forked from Minki/linux
Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull locking fixes from Thomas Gleixner: - Fix the EINTR logic in rwsem-spinlock to avoid double locking by a writer and a reader - Add a missing include to qspinlocks * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/qspinlock: Explicitly include asm/prefetch.h locking/rwsem-spinlock: Fix EINTR branch in __down_write_common()
This commit is contained in:
commit
c8b2ba83fb
@ -28,6 +28,7 @@
|
|||||||
#include <linux/percpu.h>
|
#include <linux/percpu.h>
|
||||||
#include <linux/hardirq.h>
|
#include <linux/hardirq.h>
|
||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
|
#include <linux/prefetch.h>
|
||||||
#include <asm/byteorder.h>
|
#include <asm/byteorder.h>
|
||||||
#include <asm/qspinlock.h>
|
#include <asm/qspinlock.h>
|
||||||
|
|
||||||
|
@ -231,8 +231,8 @@ int __sched __down_write_common(struct rw_semaphore *sem, int state)
|
|||||||
|
|
||||||
out_nolock:
|
out_nolock:
|
||||||
list_del(&waiter.list);
|
list_del(&waiter.list);
|
||||||
if (!list_empty(&sem->wait_list))
|
if (!list_empty(&sem->wait_list) && sem->count >= 0)
|
||||||
__rwsem_do_wake(sem, 1);
|
__rwsem_do_wake(sem, 0);
|
||||||
raw_spin_unlock_irqrestore(&sem->wait_lock, flags);
|
raw_spin_unlock_irqrestore(&sem->wait_lock, flags);
|
||||||
|
|
||||||
return -EINTR;
|
return -EINTR;
|
||||||
|
Loading…
Reference in New Issue
Block a user